Deleted Added
full compact
ieee80211_hostap.c (184205) ieee80211_hostap.c (184210)
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 184205 2008-10-23 15:53:51Z des $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_hostap.c 184210 2008-10-23 19:57:13Z des $");
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 }

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

1981 return); /* XXX just NULL out? */
1982 }
1983
1984 if ((vap->iv_flags & IEEE80211_F_WPA) &&
1985 !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo))
1986 return;
1987 /* discard challenge after association */
1988 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 }

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

1981 return); /* XXX just NULL out? */
1982 }
1983
1984 if ((vap->iv_flags & IEEE80211_F_WPA) &&
1985 !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo))
1986 return;
1987 /* discard challenge after association */
1988 if (ni->ni_challenge != NULL) {
1989 free(ni->ni_challenge, M_80211_NODE);
1989 FREE(ni->ni_challenge, M_80211_NODE);
1990 ni->ni_challenge = NULL;
1991 }
1992 /* NB: 802.11 spec says to ignore station's privacy bit */
1993 if ((capinfo & IEEE80211_CAPINFO_ESS) == 0) {
1994 capinfomismatch(ni, wh, reassoc, resp,
1995 "capability", capinfo);
1996 return;
1997 }

--- 242 unchanged lines hidden ---
1990 ni->ni_challenge = NULL;
1991 }
1992 /* NB: 802.11 spec says to ignore station's privacy bit */
1993 if ((capinfo & IEEE80211_CAPINFO_ESS) == 0) {
1994 capinfomismatch(ni, wh, reassoc, resp,
1995 "capability", capinfo);
1996 return;
1997 }

--- 242 unchanged lines hidden ---