From owner-svn-src-head@FreeBSD.ORG Sat Dec 18 20:29:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 483FC106566B; Sat, 18 Dec 2010 20:29:42 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C4F78FC14; Sat, 18 Dec 2010 20:29:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBIKTgTY028583; Sat, 18 Dec 2010 20:29:42 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBIKTfG9028581; Sat, 18 Dec 2010 20:29:42 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201012182029.oBIKTfG9028581@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 18 Dec 2010 20:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216541 - head/usr.sbin/wpa/hostapd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2010 20:29:42 -0000 Author: bschmidt Date: Sat Dec 18 20:29:41 2010 New Revision: 216541 URL: http://svn.freebsd.org/changeset/base/216541 Log: Unbreak hostapd. This code has been explicitly removed in upstream versions. Modified: head/usr.sbin/wpa/hostapd/driver_freebsd.c Modified: head/usr.sbin/wpa/hostapd/driver_freebsd.c ============================================================================== --- head/usr.sbin/wpa/hostapd/driver_freebsd.c Sat Dec 18 20:27:09 2010 (r216540) +++ head/usr.sbin/wpa/hostapd/driver_freebsd.c Sat Dec 18 20:29:41 2010 (r216541) @@ -356,40 +356,11 @@ bsd_send_eapol(void *priv, const u8 *add int encrypt, const u8 *own_addr) { struct bsd_driver_data *drv = priv; - unsigned char buf[3000]; - unsigned char *bp = buf; - struct l2_ethhdr *eth; - size_t len; - int status; - /* - * Prepend the Etherent header. If the caller left us - * space at the front we could just insert it but since - * we don't know we copy to a local buffer. Given the frequency - * and size of frames this probably doesn't matter. - */ - len = data_len + sizeof(struct l2_ethhdr); - if (len > sizeof(buf)) { - bp = malloc(len); - if (bp == NULL) { - printf("EAPOL frame discarded, cannot malloc temp " - "buffer of size %u!\n", len); - return -1; - } - } - eth = (struct l2_ethhdr *) bp; - memcpy(eth->h_dest, addr, ETH_ALEN); - memcpy(eth->h_source, own_addr, ETH_ALEN); - eth->h_proto = htons(ETH_P_EAPOL); - memcpy(eth+1, data, data_len); - - wpa_hexdump(MSG_MSGDUMP, "TX EAPOL", bp, len); - - status = l2_packet_send(drv->sock_xmit, addr, ETH_P_EAPOL, bp, len); - - if (bp != buf) - free(bp); - return status; + wpa_hexdump(MSG_MSGDUMP, "TX EAPOL", data, data_len); + + return l2_packet_send(drv->sock_xmit, addr, ETH_P_EAPOL, data, + data_len); } static int @@ -739,7 +710,7 @@ bsd_init(struct hostapd_data *hapd, stru } drv->sock_xmit = l2_packet_init(drv->ifname, NULL, ETH_P_EAPOL, - handle_read, drv, 1); + handle_read, drv, 0); if (drv->sock_xmit == NULL) goto bad; if (l2_packet_get_own_addr(drv->sock_xmit, params->own_addr))