Deleted Added
full compact
ieee80211_hostap.c (186151) ieee80211_hostap.c (186302)
1/*-
2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27#ifdef __FreeBSD__
1/*-
2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27#ifdef __FreeBSD__
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_hostap.c 186151 2008-12-16 01:17:36Z sam $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_hostap.c 186302 2008-12-18 23:00:09Z sam $");
29#endif
30
31/*
32 * IEEE 802.11 HOSTAP mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

--- 860 unchanged lines hidden (view full) ---

897 "bad sta auth mode %u", ni->ni_authmode);
898 vap->iv_stats.is_rx_bad_auth++; /* XXX */
899 /*
900 * Clear any challenge text that may be there if
901 * a previous shared key auth failed and then an
902 * open auth is attempted.
903 */
904 if (ni->ni_challenge != NULL) {
29#endif
30
31/*
32 * IEEE 802.11 HOSTAP mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

--- 860 unchanged lines hidden (view full) ---

897 "bad sta auth mode %u", ni->ni_authmode);
898 vap->iv_stats.is_rx_bad_auth++; /* XXX */
899 /*
900 * Clear any challenge text that may be there if
901 * a previous shared key auth failed and then an
902 * open auth is attempted.
903 */
904 if (ni->ni_challenge != NULL) {
905 FREE(ni->ni_challenge, M_80211_NODE);
905 free(ni->ni_challenge, M_80211_NODE);
906 ni->ni_challenge = NULL;
907 }
908 /* XXX hack to workaround calling convention */
909 ieee80211_send_error(ni, wh->i_addr2,
910 IEEE80211_FC0_SUBTYPE_AUTH,
911 (seq + 1) | (IEEE80211_STATUS_ALG<<16));
912 return;
913 }

--- 1077 unchanged lines hidden (view full) ---

1991 return); /* XXX just NULL out? */
1992 }
1993
1994 if ((vap->iv_flags & IEEE80211_F_WPA) &&
1995 !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo))
1996 return;
1997 /* discard challenge after association */
1998 if (ni->ni_challenge != NULL) {
906 ni->ni_challenge = NULL;
907 }
908 /* XXX hack to workaround calling convention */
909 ieee80211_send_error(ni, wh->i_addr2,
910 IEEE80211_FC0_SUBTYPE_AUTH,
911 (seq + 1) | (IEEE80211_STATUS_ALG<<16));
912 return;
913 }

--- 1077 unchanged lines hidden (view full) ---

1991 return); /* XXX just NULL out? */
1992 }
1993
1994 if ((vap->iv_flags & IEEE80211_F_WPA) &&
1995 !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo))
1996 return;
1997 /* discard challenge after association */
1998 if (ni->ni_challenge != NULL) {
1999 FREE(ni->ni_challenge, M_80211_NODE);
1999 free(ni->ni_challenge, M_80211_NODE);
2000 ni->ni_challenge = NULL;
2001 }
2002 /* NB: 802.11 spec says to ignore station's privacy bit */
2003 if ((capinfo & IEEE80211_CAPINFO_ESS) == 0) {
2004 capinfomismatch(ni, wh, reassoc, resp,
2005 "capability", capinfo);
2006 return;
2007 }

--- 247 unchanged lines hidden ---
2000 ni->ni_challenge = NULL;
2001 }
2002 /* NB: 802.11 spec says to ignore station's privacy bit */
2003 if ((capinfo & IEEE80211_CAPINFO_ESS) == 0) {
2004 capinfomismatch(ni, wh, reassoc, resp,
2005 "capability", capinfo);
2006 return;
2007 }

--- 247 unchanged lines hidden ---