[pkg-wpa-devel] r843 - in /hostapd/trunk: ./ debian/ doc/

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Fri Jun 1 11:05:09 UTC 2007


Author: kelmo-guest
Date: Fri Jun  1 11:05:09 2007
New Revision: 843

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=843
Log:
* (NOT RELEASED YET) New upstream release

Modified:
    hostapd/trunk/ChangeLog
    hostapd/trunk/README
    hostapd/trunk/accounting.c
    hostapd/trunk/accounting.h
    hostapd/trunk/aes.c
    hostapd/trunk/aes.h
    hostapd/trunk/aes_wrap.c
    hostapd/trunk/aes_wrap.h
    hostapd/trunk/ap.h
    hostapd/trunk/ap_list.c
    hostapd/trunk/ap_list.h
    hostapd/trunk/build_config.h
    hostapd/trunk/common.c
    hostapd/trunk/common.h
    hostapd/trunk/config.c
    hostapd/trunk/config.h
    hostapd/trunk/config_types.h
    hostapd/trunk/crypto.c
    hostapd/trunk/crypto.h
    hostapd/trunk/ctrl_iface.c
    hostapd/trunk/ctrl_iface.h
    hostapd/trunk/debian/changelog
    hostapd/trunk/defconfig
    hostapd/trunk/defs.h
    hostapd/trunk/des.c
    hostapd/trunk/doc/kerneldoc2doxygen.pl
    hostapd/trunk/doc/mainpage.doxygen
    hostapd/trunk/driver.c
    hostapd/trunk/driver_devicescape.c
    hostapd/trunk/driver_madwifi.c
    hostapd/trunk/driver_prism54.c
    hostapd/trunk/driver_test.c
    hostapd/trunk/driver_wired.c
    hostapd/trunk/eap.c
    hostapd/trunk/eap.h
    hostapd/trunk/eap_aka.c
    hostapd/trunk/eap_defs.h
    hostapd/trunk/eap_gpsk.c
    hostapd/trunk/eap_gpsk_common.c
    hostapd/trunk/eap_gpsk_common.h
    hostapd/trunk/eap_gtc.c
    hostapd/trunk/eap_i.h
    hostapd/trunk/eap_identity.c
    hostapd/trunk/eap_md5.c
    hostapd/trunk/eap_methods.c
    hostapd/trunk/eap_methods.h
    hostapd/trunk/eap_mschapv2.c
    hostapd/trunk/eap_pax.c
    hostapd/trunk/eap_pax_common.c
    hostapd/trunk/eap_pax_common.h
    hostapd/trunk/eap_peap.c
    hostapd/trunk/eap_psk.c
    hostapd/trunk/eap_psk_common.c
    hostapd/trunk/eap_psk_common.h
    hostapd/trunk/eap_sake.c
    hostapd/trunk/eap_sake_common.c
    hostapd/trunk/eap_sake_common.h
    hostapd/trunk/eap_sim.c
    hostapd/trunk/eap_sim_common.c
    hostapd/trunk/eap_sim_common.h
    hostapd/trunk/eap_sim_db.c
    hostapd/trunk/eap_sim_db.h
    hostapd/trunk/eap_tls.c
    hostapd/trunk/eap_tls_common.c
    hostapd/trunk/eap_tls_common.h
    hostapd/trunk/eap_tlv.c
    hostapd/trunk/eap_ttls.c
    hostapd/trunk/eap_ttls.h
    hostapd/trunk/eap_vendor_test.c
    hostapd/trunk/eapol_sm.c
    hostapd/trunk/eapol_sm.h
    hostapd/trunk/eloop.c
    hostapd/trunk/eloop.h
    hostapd/trunk/eloop_none.c
    hostapd/trunk/eloop_win.c
    hostapd/trunk/hlr_auc_gw.c
    hostapd/trunk/hostap_common.h
    hostapd/trunk/hostapd.8
    hostapd/trunk/hostapd.c
    hostapd/trunk/hostapd.eap_user
    hostapd/trunk/hostapd.h
    hostapd/trunk/hostapd_cli.1
    hostapd/trunk/hostapd_cli.c
    hostapd/trunk/iapp.c
    hostapd/trunk/iapp.h
    hostapd/trunk/ieee802_11.c
    hostapd/trunk/ieee802_11.h
    hostapd/trunk/ieee802_11_auth.c
    hostapd/trunk/ieee802_11_auth.h
    hostapd/trunk/ieee802_11h.c
    hostapd/trunk/ieee802_11h.h
    hostapd/trunk/ieee802_1x.c
    hostapd/trunk/ieee802_1x.h
    hostapd/trunk/includes.h
    hostapd/trunk/l2_packet.h
    hostapd/trunk/l2_packet_freebsd.c
    hostapd/trunk/l2_packet_linux.c
    hostapd/trunk/l2_packet_ndis.c
    hostapd/trunk/l2_packet_none.c
    hostapd/trunk/l2_packet_pcap.c
    hostapd/trunk/l2_packet_winpcap.c
    hostapd/trunk/md4.c
    hostapd/trunk/md5.c
    hostapd/trunk/md5.h
    hostapd/trunk/milenage.c
    hostapd/trunk/milenage.h
    hostapd/trunk/mlme.c
    hostapd/trunk/mlme.h
    hostapd/trunk/ms_funcs.c
    hostapd/trunk/ms_funcs.h
    hostapd/trunk/nt_password_hash.c
    hostapd/trunk/os.h
    hostapd/trunk/os_internal.c
    hostapd/trunk/os_none.c
    hostapd/trunk/os_unix.c
    hostapd/trunk/os_win32.c
    hostapd/trunk/pmksa_cache.c
    hostapd/trunk/pmksa_cache.h
    hostapd/trunk/preauth.c
    hostapd/trunk/preauth.h
    hostapd/trunk/radius.c
    hostapd/trunk/radius.h
    hostapd/trunk/radius_client.c
    hostapd/trunk/radius_client.h
    hostapd/trunk/radius_server.c
    hostapd/trunk/radius_server.h
    hostapd/trunk/rc4.c
    hostapd/trunk/rc4.h
    hostapd/trunk/reconfig.c
    hostapd/trunk/sha1.c
    hostapd/trunk/sha1.h
    hostapd/trunk/sha256.c
    hostapd/trunk/sha256.h
    hostapd/trunk/sta_info.c
    hostapd/trunk/sta_info.h
    hostapd/trunk/state_machine.h
    hostapd/trunk/tls.h
    hostapd/trunk/tls_gnutls.c
    hostapd/trunk/tls_none.c
    hostapd/trunk/tls_openssl.c
    hostapd/trunk/version.h
    hostapd/trunk/vlan_init.c
    hostapd/trunk/wireless_copy.h
    hostapd/trunk/wme.c
    hostapd/trunk/wpa.c
    hostapd/trunk/wpa.h
    hostapd/trunk/wpa_common.h
    hostapd/trunk/wpa_ctrl.c
    hostapd/trunk/wpa_ctrl.h

Modified: hostapd/trunk/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ChangeLog?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ChangeLog (original)
+++ hostapd/trunk/ChangeLog Fri Jun  1 11:05:09 2007
@@ -1,4 +1,16 @@
 ChangeLog for hostapd
+
+2007-05-28 - v0.5.8
+	* updated driver_devicescape.c to build with the current
+	  wireless-dev.git tree and net/d80211 changes
+	* updated EAP Generalized Pre-Shared Key (EAP-GPSK) to use the latest
+	  draft (draft-ietf-emu-eap-gpsk-03.txt)
+	* fixed EAP-MSCHAPv2 server to use a space between S and M parameters
+	  in Success Request [Bug 203]
+	* added support for sending EAP-AKA Notifications in error cases
+	* RADIUS server: added support for processing duplicate messages
+	  (retransmissions from RADIUS client) by replying with the previous
+	  reply
 
 2006-12-31 - v0.5.7
 	* updated EAP-SAKE to RFC 4763 and the IANA-allocated EAP type 48

Modified: hostapd/trunk/README
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/README?rev=843&op=diff
==============================================================================
--- hostapd/trunk/README (original)
+++ hostapd/trunk/README Fri Jun  1 11:05:09 2007
@@ -2,8 +2,7 @@
 	  Authenticator and RADIUS authentication server
 ================================================================
 
-Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi> and
-contributors
+Copyright (c) 2002-2007, Jouni Malinen <j at w1.fi> and contributors
 All Rights Reserved.
 
 This program is dual-licensed under both the GPL version 2 and BSD

Modified: hostapd/trunk/accounting.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/accounting.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/accounting.c (original)
+++ hostapd/trunk/accounting.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS Accounting
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/accounting.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/accounting.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/accounting.h (original)
+++ hostapd/trunk/accounting.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS Accounting
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/aes.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/aes.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/aes.c (original)
+++ hostapd/trunk/aes.c Fri Jun  1 11:05:09 2007
@@ -9,7 +9,7 @@
  *   cost of reduced throughput (quite small difference on Pentium 4,
  *   10-25% when using -O1 or -O2 optimization)
  *
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/aes.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/aes.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/aes.h (original)
+++ hostapd/trunk/aes.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * AES functions
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/aes_wrap.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/aes_wrap.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/aes_wrap.c (original)
+++ hostapd/trunk/aes_wrap.c Fri Jun  1 11:05:09 2007
@@ -7,7 +7,7 @@
  * - AES-128 EAX mode encryption/decryption
  * - AES-128 CBC
  *
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/aes_wrap.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/aes_wrap.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/aes_wrap.h (original)
+++ hostapd/trunk/aes_wrap.h Fri Jun  1 11:05:09 2007
@@ -7,7 +7,7 @@
  * - AES-128 EAX mode encryption/decryption
  * - AES-128 CBC
  *
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ap.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ap.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ap.h (original)
+++ hostapd/trunk/ap.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Station table data structures
- * Copyright (c) 2002-2004, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2004, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ap_list.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ap_list.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ap_list.c (original)
+++ hostapd/trunk/ap_list.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / AP table
- * Copyright 2002-2003, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright 2002-2003, Jouni Malinen <j at w1.fi>
  * Copyright 2003-2004, Instant802 Networks, Inc.
  * Copyright 2006, Devicescape Software, Inc.
  *

Modified: hostapd/trunk/ap_list.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ap_list.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ap_list.h (original)
+++ hostapd/trunk/ap_list.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / AP table
- * Copyright 2002-2003, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright 2002-2003, Jouni Malinen <j at w1.fi>
  * Copyright 2003-2004, Instant802 Networks, Inc.
  * Copyright 2006, Devicescape Software, Inc.
  *

Modified: hostapd/trunk/build_config.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/build_config.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/build_config.h (original)
+++ hostapd/trunk/build_config.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd - Build time configuration defines
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/common.c (original)
+++ hostapd/trunk/common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / common helper functions, etc.
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -494,14 +494,14 @@
 		}
 	}
 
-	if (strcmp(argv[optind], "--") == 0) {
+	if (os_strcmp(argv[optind], "--") == 0) {
 		/* no more options */
 		optind++;
 		return EOF;
 	}
 
 	optopt = argv[optind][optchr];
-	cp = strchr(optstring, optopt);
+	cp = os_strchr(optstring, optopt);
 	if (cp == NULL || optopt == ':') {
 		if (argv[optind][++optchr] == '\0') {
 			optchr = 1;

Modified: hostapd/trunk/common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/common.h (original)
+++ hostapd/trunk/common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / common helper functions, etc.
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -264,8 +264,8 @@
 #define wpa_hexdump_key(l,t,b,le) do { } while (0)
 #define wpa_hexdump_ascii(l,t,b,le) do { } while (0)
 #define wpa_hexdump_ascii_key(l,t,b,le) do { } while (0)
-#define wpa_debug_open_file(void) do { } while (0)
-#define wpa_debug_close_file(void) do { } while (0)
+#define wpa_debug_open_file() do { } while (0)
+#define wpa_debug_close_file() do { } while (0)
 
 #else /* CONFIG_NO_STDOUT_DEBUG */
 

Modified: hostapd/trunk/config.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/config.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/config.c (original)
+++ hostapd/trunk/config.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Configuration file
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -451,7 +451,7 @@
 		memset(ssid->wpa_passphrase, 0,
 		       strlen(ssid->wpa_passphrase));
 		free(ssid->wpa_passphrase);
-		ssid->wpa_passphrase = 0;
+		ssid->wpa_passphrase = NULL;
 	}
 
 	if (ssid->wpa_psk_file) {

Modified: hostapd/trunk/config.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/config.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/config.h (original)
+++ hostapd/trunk/config.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Configuration file
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/config_types.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/config_types.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/config_types.h (original)
+++ hostapd/trunk/config_types.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Shared configuration file defines
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/crypto.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/crypto.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/crypto.c (original)
+++ hostapd/trunk/crypto.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / wrapper functions for libcrypto
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/crypto.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/crypto.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/crypto.h (original)
+++ hostapd/trunk/crypto.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / wrapper functions for crypto libraries
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ctrl_iface.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ctrl_iface.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ctrl_iface.c (original)
+++ hostapd/trunk/ctrl_iface.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / UNIX domain socket -based control interface
- * Copyright (c) 2004, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ctrl_iface.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ctrl_iface.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ctrl_iface.h (original)
+++ hostapd/trunk/ctrl_iface.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / UNIX domain socket -based control interface
- * Copyright (c) 2004, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/debian/changelog?rev=843&op=diff
==============================================================================
--- hostapd/trunk/debian/changelog (original)
+++ hostapd/trunk/debian/changelog Fri Jun  1 11:05:09 2007
@@ -1,3 +1,9 @@
+hostapd (1:0.5.8-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Kel Modderman <kel at otaku42.de>  Fri, 01 Jun 2007 21:04:44 +1000
+
 hostapd (1:0.5.7-1) unstable; urgency=low
 
   * New upstream release.

Modified: hostapd/trunk/defconfig
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/defconfig?rev=843&op=diff
==============================================================================
--- hostapd/trunk/defconfig (original)
+++ hostapd/trunk/defconfig Fri Jun  1 11:05:09 2007
@@ -29,9 +29,7 @@
 # be used to set these (WIRELESS_DEV must point to the root directory of the
 # wireless-dev.git tree).
 #WIRELESS_DEV=/usr/src/wireless-dev
-#CFLAGS += -I$(WIRELESS_DEV)/include
-#CFLAGS += -I$(WIRELESS_DEV)/net/d80211
-#CFLAGS += -D_LINUX_TYPES_H
+#CFLAGS += -I$(WIRELESS_DEV)/net/mac80211
 
 # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
 #CONFIG_DRIVER_BSD=y

Modified: hostapd/trunk/defs.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/defs.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/defs.h (original)
+++ hostapd/trunk/defs.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Common definitions
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/des.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/des.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/des.c (original)
+++ hostapd/trunk/des.c Fri Jun  1 11:05:09 2007
@@ -2,7 +2,7 @@
  * DES and 3DES-EDE ciphers
  *
  * Modifications to LibTomCrypt implementation:
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/doc/kerneldoc2doxygen.pl
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/doc/kerneldoc2doxygen.pl?rev=843&op=diff
==============================================================================
--- hostapd/trunk/doc/kerneldoc2doxygen.pl (original)
+++ hostapd/trunk/doc/kerneldoc2doxygen.pl Fri Jun  1 11:05:09 2007
@@ -20,7 +20,7 @@
 #
 ##########################################################################
 # Copyright (C) 2003 Jonathan Foster <jon at jon-foster.co.uk>
-# Copyright (C) 2005 Jouni Malinen <jkmaline at cc.hut.fi>
+# Copyright (C) 2005 Jouni Malinen <j at w1.fi>
 # (modified for kerneldoc format used in wpa_supplicant)
 #
 # This program is free software; you can redistribute it and/or modify

Modified: hostapd/trunk/doc/mainpage.doxygen
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/doc/mainpage.doxygen?rev=843&op=diff
==============================================================================
--- hostapd/trunk/doc/mainpage.doxygen (original)
+++ hostapd/trunk/doc/mainpage.doxygen Fri Jun  1 11:05:09 2007
@@ -13,7 +13,7 @@
 has been implemented, how it can be modified, how new drivers can be
 supported, and how hostapd can be ported to other operating
 systems. If any information is missing, feel free to contact Jouni
-Malinen <jkmaline at cc.hut.fi> for more information. Contributions as
+Malinen <j at w1.fi> for more information. Contributions as
 patch files are also very welcome at the same address. Please note
 that hostapd is licensed under dual license, GPLv2 or BSD at user's
 choice. All contributions to hostapd are expected to use compatible

Modified: hostapd/trunk/driver.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/driver.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/driver.c (original)
+++ hostapd/trunk/driver.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Kernel driver communication with Linux Host AP driver
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/driver_devicescape.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/driver_devicescape.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/driver_devicescape.c (original)
+++ hostapd/trunk/driver_devicescape.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Kernel driver communication with Devicescape IEEE 802.11 stack
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  * Copyright (c) 2003-2004, Instant802 Networks, Inc.
  * Copyright (c) 2005-2006, Devicescape Software, Inc.
  *
@@ -38,8 +38,16 @@
 #include "sta_info.h"
 #include "hw_features.h"
 #include <hostapd_ioctl.h>
-#include <net/d80211_common.h>
-#include <net/d80211_shared.h>
+#include <ieee80211_common.h>
+/* from net/mac80211.h */
+enum {
+	MODE_IEEE80211A = 0 /* IEEE 802.11a */,
+	MODE_IEEE80211B = 1 /* IEEE 802.11b only */,
+	MODE_ATHEROS_TURBO = 2 /* Atheros Turbo mode (2x.11a at 5 GHz) */,
+	MODE_IEEE80211G = 3 /* IEEE 802.11g (and 802.11b compatibility) */,
+	MODE_ATHEROS_TURBOG = 4 /* Atheros Turbo mode (2x.11g at 2.4 GHz) */,
+	NUM_IEEE80211_MODES = 5
+};
 #include "mlme.h"
 
 
@@ -623,23 +631,6 @@
 	}
 
 	return res;
-}
-
-
-static int i802_set_assoc_ap(void *priv, const u8 *addr)
-{
-	struct i802_driver_data *drv = priv;
-	struct prism2_hostapd_param param;
-
-	memset(&param, 0, sizeof(param));
-	param.cmd = PRISM2_HOSTAPD_SET_ASSOC_AP_ADDR;
-	memcpy(param.sta_addr, addr, ETH_ALEN);
-	if (hostapd_ioctl(drv, &param, sizeof(param))) {
-		printf("Could not set associated AP address to kernel "
-		       "driver.\n");
-		return -1;
-	}
-	return 0;
 }
 
 
@@ -1156,7 +1147,10 @@
 
 		feature->channels = malloc(clen);
 		feature->rates = malloc(rlen);
-		if (!feature->channels || !feature->rates) {
+		if (!feature->channels || !feature->rates ||
+		    pos + clen + rlen > end) {
+			wpa_printf(MSG_ERROR, "%s: Could not parse data",
+				   __func__);
 			hostapd_free_hw_features(modes, *num_modes);
 			modes = NULL;
 			break;
@@ -2007,7 +2001,6 @@
 	.sta_remove = i802_sta_remove,
 	.set_ssid = i802_set_ssid,
 	.send_mgmt_frame = i802_send_mgmt_frame,
-	.set_assoc_ap = i802_set_assoc_ap,
 	.sta_add = i802_sta_add,
 	.get_inact_sec = i802_get_inact_sec,
 	.sta_clear_stats = i802_sta_clear_stats,

Modified: hostapd/trunk/driver_madwifi.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/driver_madwifi.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/driver_madwifi.c (original)
+++ hostapd/trunk/driver_madwifi.c Fri Jun  1 11:05:09 2007
@@ -2,7 +2,7 @@
  * hostapd / Driver interaction with MADWIFI 802.11 driver
  * Copyright (c) 2004, Sam Leffler <sam at errno.com>
  * Copyright (c) 2004, Video54 Technologies
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/driver_prism54.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/driver_prism54.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/driver_prism54.c (original)
+++ hostapd/trunk/driver_prism54.c Fri Jun  1 11:05:09 2007
@@ -2,6 +2,7 @@
  * hostapd / Driver interaction with Prism54 PIMFOR interface
  * Copyright (c) 2004, Bell Kin <bell_kin at pek.com.tw>
  * based on hostap driver.c, ieee802_11.c
+ * Copyright (c) 2002-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -171,7 +172,7 @@
 	struct prism54_driver_data *drv = priv;
 	pimdev_hdr *hdr;
 	char *pos;
-	int res;
+
 	hdr = malloc(sizeof(*hdr) + ETH_ALEN);
 	if (hdr == NULL)
 		return -1;
@@ -183,7 +184,7 @@
 	}
 	pos = (char *) (hdr + 1);
 	memcpy(pos, addr, ETH_ALEN);
-	res = send(drv->pim_sock, hdr, sizeof(*hdr) + ETH_ALEN, 0);
+	send(drv->pim_sock, hdr, sizeof(*hdr) + ETH_ALEN, 0);
 	prism54_waitpim(priv, hdr->oid, hdr, sizeof(*hdr) + ETH_ALEN, 10);
 	free(hdr);
 	return 0;
@@ -315,7 +316,6 @@
 	struct prism54_driver_data *drv = priv;
 	pimdev_hdr *hdr;
 	unsigned long *ul;
-	int ret;
 	int blen = sizeof(*hdr) + sizeof(*ul);
 
 	hdr = malloc(blen);
@@ -326,22 +326,22 @@
 	hdr->op = htonl(PIMOP_SET);
 	hdr->oid = htonl(DOT11_OID_EXUNENCRYPTED);
 	*ul = htonl(DOT11_BOOL_TRUE); /* not accept */
-	ret = send(drv->pim_sock, hdr, blen, 0);
+	send(drv->pim_sock, hdr, blen, 0);
 	prism54_waitpim(priv, DOT11_OID_EXUNENCRYPTED, hdr, blen, 10);
 	hdr->op = htonl(PIMOP_SET);
 	hdr->oid = htonl(DOT11_OID_MLMEAUTOLEVEL);
 	*ul = htonl(DOT11_MLME_EXTENDED);
-	ret = send(drv->pim_sock, hdr, blen, 0);
+	send(drv->pim_sock, hdr, blen, 0);
 	prism54_waitpim(priv, DOT11_OID_MLMEAUTOLEVEL, hdr, blen, 10);
 	hdr->op = htonl(PIMOP_SET);
 	hdr->oid = htonl(DOT11_OID_DOT1XENABLE);
 	*ul = htonl(DOT11_BOOL_TRUE);
-	ret = send(drv->pim_sock, hdr, blen, 0);
+	send(drv->pim_sock, hdr, blen, 0);
 	prism54_waitpim(priv, DOT11_OID_DOT1XENABLE, hdr, blen, 10);
 	hdr->op = htonl(PIMOP_SET);
 	hdr->oid = htonl(DOT11_OID_AUTHENABLE);
 	*ul = htonl(DOT11_AUTH_OS); /* OS */
-	ret = send(drv->pim_sock, hdr, blen, 0);
+	send(drv->pim_sock, hdr, blen, 0);
 	prism54_waitpim(priv, DOT11_OID_AUTHENABLE, hdr, blen, 10);
 	free(hdr);
 	return 0;
@@ -407,7 +407,8 @@
 	struct prism54_driver_data *drv = priv;
 	struct obj_mlmeex *mlme;
 	pimdev_hdr *hdr;
-	int ret, i;
+	int ret;
+	unsigned int i;
 	long *nsta;
 	int blen = sizeof(*hdr) + sizeof(*mlme);
 	char *mac_id;
@@ -547,7 +548,6 @@
 				    const u8 *elem, size_t elem_len)
 {
 	struct prism54_driver_data *drv = priv;
-	int res;
 	pimdev_hdr *hdr;
 	char *pos;
 	struct obj_attachment_hdr *attach;
@@ -566,9 +566,9 @@
 	pos = ((char*) attach) + sizeof(*attach);
 	if (elem)
 		memcpy(pos, elem, elem_len);
-	res = send(drv->pim_sock, hdr, blen, 0);
+	send(drv->pim_sock, hdr, blen, 0);
 	attach->type = DOT11_PKT_PROBE_RESP;
-	res = send(drv->pim_sock, hdr, blen, 0);
+	send(drv->pim_sock, hdr, blen, 0);
 	free(hdr);
 	return 0;
 }
@@ -859,15 +859,20 @@
 static void handle_pim(int sock, void *eloop_ctx, void *sock_ctx)
 {
 	struct prism54_driver_data *drv = eloop_ctx;
-	size_t len;
+	int len;
 	pimdev_hdr *hdr;
 
 	hdr = malloc(PIM_BUF_SIZE);
 	if (hdr == NULL)
 		return;
 	len = recv(sock, hdr, PIM_BUF_SIZE, 0);
+	if (len < 0) {
+		perror("recv");
+		free(hdr);
+		return;
+	}
 	if (len < 8) {
-		printf("handle_pim: too short (%lu)\n", (unsigned long) len);
+		printf("handle_pim: too short (%d)\n", len);
 		free(hdr);
 		return;
 	}

Modified: hostapd/trunk/driver_test.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/driver_test.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/driver_test.c (original)
+++ hostapd/trunk/driver_test.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Driver interface for development testing
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -576,6 +576,13 @@
 			continue;
 
 		free(bss->ie);
+
+		if (elem == NULL) {
+			bss->ie = NULL;
+			bss->ielen = 0;
+			return 0;
+		}
+
 		bss->ie = malloc(elem_len);
 		if (bss->ie) {
 			memcpy(bss->ie, elem, elem_len);

Modified: hostapd/trunk/driver_wired.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/driver_wired.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/driver_wired.c (original)
+++ hostapd/trunk/driver_wired.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Kernel driver communication for wired (Ethernet) drivers
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  * Copyright (c) 2004, Gunter Burchardt <tira at isx.de>
  *
  * This program is free software; you can redistribute it and/or modify

Modified: hostapd/trunk/eap.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap.c (original)
+++ hostapd/trunk/eap.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP Standalone Authenticator state machine (RFC 4137)
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap.h (original)
+++ hostapd/trunk/eap.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP Standalone Authenticator state machine (RFC 4137)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_aka.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_aka.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_aka.c (original)
+++ hostapd/trunk/eap_aka.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-AKA (RFC 4187)
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -35,19 +35,22 @@
 	u8 ik[EAP_AKA_IK_LEN];
 	u8 res[EAP_AKA_RES_MAX_LEN];
 	size_t res_len;
-	enum { IDENTITY, CHALLENGE, REAUTH, SUCCESS, FAILURE } state;
+	enum {
+		IDENTITY, CHALLENGE, REAUTH, NOTIFICATION, SUCCESS, FAILURE
+	} state;
 	char *next_pseudonym;
 	char *next_reauth_id;
 	u16 counter;
 	struct eap_sim_reauth *reauth;
 	int auts_reported; /* whether the current AUTS has been reported to the
 			    * eap_sim_db */
+	u16 notification;
 };
 
 
 static void eap_aka_determine_identity(struct eap_sm *sm,
 				       struct eap_aka_data *data,
-				       int before_identity);
+				       int before_identity, int after_reauth);
 
 
 static const char * eap_aka_state_txt(int state)
@@ -63,6 +66,8 @@
 		return "SUCCESS";
 	case FAILURE:
 		return "FAILURE";
+	case NOTIFICATION:
+		return "NOTIFICATION";
 	default:
 		return "Unknown?!";
 	}
@@ -91,7 +96,7 @@
 	if (data == NULL)
 		return NULL;
 	data->state = IDENTITY;
-	eap_aka_determine_identity(sm, data, 1);
+	eap_aka_determine_identity(sm, data, 1, 0);
 
 	return data;
 }
@@ -245,6 +250,22 @@
 }
 
 
+static u8 * eap_aka_build_notification(struct eap_sm *sm,
+				       struct eap_aka_data *data,
+				       int id, size_t *reqDataLen)
+{
+	struct eap_sim_msg *msg;
+
+	wpa_printf(MSG_DEBUG, "EAP-AKA: Generating Notification");
+	msg = eap_sim_msg_init(EAP_CODE_REQUEST, id, EAP_TYPE_AKA,
+			       EAP_AKA_SUBTYPE_NOTIFICATION);
+	wpa_printf(MSG_DEBUG, "   AT_NOTIFICATION");
+	eap_sim_msg_add(msg, EAP_SIM_AT_NOTIFICATION, data->notification,
+			NULL, 0);
+	return eap_sim_msg_finish(msg, reqDataLen, NULL, NULL, 0);
+}
+
+
 static u8 * eap_aka_buildReq(struct eap_sm *sm, void *priv, int id,
 			     size_t *reqDataLen)
 {
@@ -258,6 +279,8 @@
 		return eap_aka_build_challenge(sm, data, id, reqDataLen);
 	case REAUTH:
 		return eap_aka_build_reauth(sm, data, id, reqDataLen);
+	case NOTIFICATION:
+		return eap_aka_build_notification(sm, data, id, reqDataLen);
 	default:
 		wpa_printf(MSG_DEBUG, "EAP-AKA: Unknown state %d in "
 			   "buildReq", data->state);
@@ -270,20 +293,23 @@
 static Boolean eap_aka_check(struct eap_sm *sm, void *priv,
 			     u8 *respData, size_t respDataLen)
 {
-	struct eap_aka_data *data = priv;
 	struct eap_hdr *resp;
-	u8 *pos, subtype;
-	size_t len;
+	u8 *pos;
 
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	if (respDataLen < sizeof(*resp) + 4 || *pos != EAP_TYPE_AKA ||
-	    (len = ntohs(resp->length)) > respDataLen) {
+	    (ntohs(resp->length)) > respDataLen) {
 		wpa_printf(MSG_INFO, "EAP-AKA: Invalid frame");
 		return TRUE;
 	}
-	subtype = pos[1];
-
+
+	return FALSE;
+}
+
+
+static Boolean eap_aka_subtype_ok(struct eap_aka_data *data, u8 subtype)
+{
 	if (subtype == EAP_AKA_SUBTYPE_CLIENT_ERROR ||
 	    subtype == EAP_AKA_SUBTYPE_AUTHENTICATION_REJECT)
 		return FALSE;
@@ -311,6 +337,13 @@
 			return TRUE;
 		}
 		break;
+	case NOTIFICATION:
+		if (subtype != EAP_AKA_SUBTYPE_NOTIFICATION) {
+			wpa_printf(MSG_INFO, "EAP-AKA: Unexpected response "
+				   "subtype %d", subtype);
+			return TRUE;
+		}
+		break;
 	default:
 		wpa_printf(MSG_INFO, "EAP-AKA: Unexpected state (%d) for "
 			   "processing a response", data->state);
@@ -323,7 +356,7 @@
 
 static void eap_aka_determine_identity(struct eap_sm *sm,
 				       struct eap_aka_data *data,
-				       int before_identity)
+				       int before_identity, int after_reauth)
 {
 	const u8 *identity;
 	size_t identity_len;
@@ -332,8 +365,11 @@
 	identity = NULL;
 	identity_len = 0;
 
-	if (sm->identity && sm->identity_len > 0 &&
-	    sm->identity[0] == EAP_AKA_PERMANENT_PREFIX) {
+	if (after_reauth && data->reauth) {
+		identity = data->reauth->identity;
+		identity_len = data->reauth->identity_len;
+	} else if (sm->identity && sm->identity_len > 0 &&
+		   sm->identity[0] == EAP_AKA_PERMANENT_PREFIX) {
 		identity = sm->identity;
 		identity_len = sm->identity_len;
 	} else {
@@ -377,13 +413,10 @@
 	wpa_hexdump_ascii(MSG_DEBUG, "EAP-AKA: Identity",
 			  identity, identity_len);
 
-	if (data->reauth) {
+	if (!after_reauth && data->reauth) {
 		eap_aka_state(data, REAUTH);
 		return;
 	}
-
-	data->counter = 0; /* reset re-auth counter since this is full auth */
-	data->reauth = NULL;
 
 	res = eap_sim_db_get_aka_auth(sm->eap_sim_db_priv, identity,
 				      identity_len, data->rand, data->autn,
@@ -395,10 +428,15 @@
 		sm->method_pending = METHOD_PENDING_WAIT;
 		return;
 	}
+
+	data->reauth = NULL;
+	data->counter = 0; /* reset re-auth counter since this is full auth */
+
 	if (res != 0) {
 		wpa_printf(MSG_INFO, "EAP-AKA: Failed to get AKA "
 			   "authentication data for the peer");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 	if (sm->method_pending == METHOD_PENDING_WAIT) {
@@ -429,7 +467,8 @@
 	if (attr->mac || attr->iv || attr->encr_data) {
 		wpa_printf(MSG_WARNING, "EAP-AKA: Unexpected attribute "
 			   "received in EAP-Response/AKA-Identity");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 
@@ -443,7 +482,7 @@
 		}
 	}
 
-	eap_aka_determine_identity(sm, data, 0);
+	eap_aka_determine_identity(sm, data, 0, 0);
 }
 
 
@@ -462,7 +501,8 @@
 			       NULL, 0)) {
 		wpa_printf(MSG_WARNING, "EAP-AKA: Challenge message "
 			   "did not include valid AT_MAC");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 
@@ -470,7 +510,8 @@
 	    memcmp(attr->res, data->res, data->res_len) != 0) {
 		wpa_printf(MSG_WARNING, "EAP-AKA: Challenge message did not "
 			   "include valid AT_RES");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 
@@ -511,7 +552,8 @@
 	if (attr->auts == NULL) {
 		wpa_printf(MSG_WARNING, "EAP-AKA: Synchronization-Failure "
 			   "message did not include valid AT_AUTS");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 
@@ -523,13 +565,14 @@
 				     sm->identity_len, attr->auts,
 				     data->rand)) {
 		wpa_printf(MSG_WARNING, "EAP-AKA: Resynchronization failed");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 	data->auts_reported = 1;
 
 	/* Try again after resynchronization */
-	eap_aka_determine_identity(sm, data, 0);
+	eap_aka_determine_identity(sm, data, 0, 0);
 }
 
 
@@ -579,6 +622,15 @@
 
 	wpa_printf(MSG_DEBUG, "EAP-AKA: Re-authentication response includes "
 		   "the correct AT_MAC");
+
+	if (eattr.counter_too_small) {
+		wpa_printf(MSG_DEBUG, "EAP-AKA: Re-authentication response "
+			   "included AT_COUNTER_TOO_SMALL - starting full "
+			   "authentication");
+		eap_aka_determine_identity(sm, data, 0, 1);
+		return;
+	}
+
 	eap_aka_state(data, SUCCESS);
 
 	if (data->reauth) {
@@ -614,7 +666,8 @@
 	return;
 
 fail:
-	eap_aka_state(data, FAILURE);
+	data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+	eap_aka_state(data, NOTIFICATION);
 	eap_sim_db_remove_reauth(sm->eap_sim_db_priv, data->reauth);
 	data->reauth = NULL;
 	free(decrypted);
@@ -628,6 +681,25 @@
 {
 	wpa_printf(MSG_DEBUG, "EAP-AKA: Client reported error %d",
 		   attr->client_error_code);
+	eap_aka_state(data, FAILURE);
+}
+
+
+static void eap_aka_process_authentication_reject(
+	struct eap_sm *sm, struct eap_aka_data *data,
+	u8 *respData, size_t respDataLen, struct eap_sim_attrs *attr)
+{
+	wpa_printf(MSG_DEBUG, "EAP-AKA: Client rejected authentication");
+	eap_aka_state(data, FAILURE);
+}
+
+
+static void eap_aka_process_notification(struct eap_sm *sm,
+					 struct eap_aka_data *data,
+					 u8 *respData, size_t respDataLen,
+					 struct eap_sim_attrs *attr)
+{
+	wpa_printf(MSG_DEBUG, "EAP-AKA: Client replied to notification");
 	eap_aka_state(data, FAILURE);
 }
 
@@ -644,17 +716,33 @@
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	subtype = pos[1];
-	len = ntohs(resp->length);
+
+	if (eap_aka_subtype_ok(data, subtype)) {
+		wpa_printf(MSG_DEBUG, "EAP-AKA: Unrecognized or unexpected "
+			   "EAP-AKA Subtype in EAP Response");
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
+		return;
+	}
+
+	len = be_to_host16(resp->length);
 	pos += 4;
 
 	if (eap_sim_parse_attr(pos, respData + len, &attr, 1, 0)) {
 		wpa_printf(MSG_DEBUG, "EAP-AKA: Failed to parse attributes");
-		eap_aka_state(data, FAILURE);
+		data->notification = EAP_SIM_GENERAL_FAILURE_BEFORE_AUTH;
+		eap_aka_state(data, NOTIFICATION);
 		return;
 	}
 
 	if (subtype == EAP_AKA_SUBTYPE_CLIENT_ERROR) {
 		eap_aka_process_client_error(sm, data, respData, len, &attr);
+		return;
+	}
+
+	if (subtype == EAP_AKA_SUBTYPE_AUTHENTICATION_REJECT) {
+		eap_aka_process_authentication_reject(sm, data, respData, len,
+						      &attr);
 		return;
 	}
 
@@ -673,6 +761,9 @@
 		break;
 	case REAUTH:
 		eap_aka_process_reauth(sm, data, respData, len, &attr);
+		break;
+	case NOTIFICATION:
+		eap_aka_process_notification(sm, data, respData, len, &attr);
 		break;
 	default:
 		wpa_printf(MSG_DEBUG, "EAP-AKA: Unknown state %d in "

Modified: hostapd/trunk/eap_defs.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_defs.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_defs.h (original)
+++ hostapd/trunk/eap_defs.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: Shared EAP definitions
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -55,8 +55,8 @@
 	EAP_TYPE_MSCHAPV2 = 26 /* draft-kamath-pppext-eap-mschapv2-00.txt */,
 	EAP_TYPE_TLV = 33 /* draft-josefsson-pppext-eap-tls-eap-07.txt */,
 	EAP_TYPE_FAST = 43 /* draft-cam-winget-eap-fast-05.txt */,
-	EAP_TYPE_PAX = 46 /* draft-clancy-eap-pax-11.txt */,
-	EAP_TYPE_PSK = 47 /* draft-bersani-eap-psk-11.txt */,
+	EAP_TYPE_PAX = 46 /* RFC 4746 */,
+	EAP_TYPE_PSK = 47 /* RFC 4764 */,
 	EAP_TYPE_SAKE = 48 /* RFC 4763 */,
 	EAP_TYPE_EXPANDED = 254 /* RFC 3748 */,
 	EAP_TYPE_GPSK = 255 /* EXPERIMENTAL - type not yet allocated

Modified: hostapd/trunk/eap_gpsk.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_gpsk.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_gpsk.c (original)
+++ hostapd/trunk/eap_gpsk.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
- * hostapd / EAP-GPSK (draft-ietf-emu-eap-gpsk-01.txt) server
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * hostapd / EAP-GPSK (draft-ietf-emu-eap-gpsk-03.txt) server
+ * Copyright (c) 2006-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_gpsk_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_gpsk_common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_gpsk_common.c (original)
+++ hostapd/trunk/eap_gpsk_common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-GPSK shared routines
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -17,6 +17,8 @@
 #include "common.h"
 #include "eap_defs.h"
 #include "aes_wrap.h"
+#include "crypto.h"
+#include "sha1.h"
 #include "sha256.h"
 #include "eap_gpsk_common.h"
 
@@ -41,46 +43,36 @@
 }
 
 
-static int eap_gpsk_gkdf_aes(const u8 *psk, const u8 *data, size_t data_len,
-			     u8 *buf, size_t len)
-{
-	u8 *tmp, *pos, *opos;
-	size_t i, n, size, left, clen;
-
-	size = 16;
-
-	tmp = os_malloc(size + data_len + 2 + 2);
-	if (tmp == NULL) {
-		wpa_printf(MSG_DEBUG, "EAP-GPSK: Failed to allocate memory "
-			   "for GKDF");
-		return -1;
-	}
+static int eap_gpsk_gkdf(const u8 *psk /* Y */, size_t psk_len,
+			 const u8 *data /* Z */, size_t data_len,
+			 u8 *buf, size_t len /* X */)
+{
+	u8 *opos;
+	size_t i, n, hashlen, left, clen;
+	u8 ibuf[2], hash[SHA1_MAC_LEN];
+	const u8 *addr[3];
+	size_t vlen[3];
+
+	hashlen = SHA1_MAC_LEN;
+	/* M_i = Hash-Function (i || Y || Z); */
+	addr[0] = ibuf;
+	vlen[0] = sizeof(ibuf);
+	addr[1] = psk;
+	vlen[1] = psk_len;
+	addr[2] = data;
+	vlen[2] = data_len;
 
 	opos = buf;
 	left = len;
-	n = (len + size - 1) / size;
+	n = (len + hashlen - 1) / hashlen;
 	for (i = 1; i <= n; i++) {
-		pos = tmp;
-		if (i > 1)
-			pos += size;
-		os_memcpy(pos, data, data_len);
-		pos += data_len;
-		WPA_PUT_BE16(pos, i);
-		pos += 2;
-		WPA_PUT_BE16(pos, len);
-		pos += 2;
-
-		if (omac1_aes_128(psk, tmp, pos - tmp, tmp) < 0) {
-			os_free(tmp);
-			return -1;
-		}
-		clen = left > size ? size : left;
-		os_memcpy(opos, tmp, clen);
+		WPA_PUT_BE16(ibuf, i);
+		sha1_vector(3, addr, vlen, hash);
+		clen = left > hashlen ? hashlen : left;
+		os_memcpy(opos, hash, clen);
 		opos += clen;
 		left -= clen;
 	}
-
-	os_free(tmp);
 
 	return 0;
 }
@@ -93,7 +85,7 @@
 {
 #define EAP_GPSK_SK_LEN_AES 16
 #define EAP_GPSK_PK_LEN_AES 16
-	u8 zero_string[16], mk[16], *pos, *data;
+	u8 zero_string[1], mk[32], *pos, *data;
 	u8 kdf_out[EAP_MSK_LEN + EAP_EMSK_LEN + EAP_GPSK_SK_LEN_AES +
 		   EAP_GPSK_PK_LEN_AES];
 	size_t data_len;
@@ -102,14 +94,15 @@
 	 * inputString = RAND_Client || ID_Client || RAND_Server || ID_Server
 	 *            (= seed)
 	 * KS = 16, PL = psk_len, CSuite_Sel = 0x000000 0x000001
-	 * MK = GKDF-16(Zero-String, PL || PSK || CSuite_Sel || inputString)
-	 * KDF_out = GKDF-160(MK, inputString)
-	 * MSK = KDF_out[0..63]
-	 * EMSK = KDF_out[64..127]
-	 * SK = KDF_out[128..143]
-	 * PK = KDF_out[144..159]
-	 * MID = GKDF-16(Zero-String, "Method ID" || EAP_Method_Type ||
-	 *               CSuite_Sel || inputString)
+	 * MK = GKDF-32 (0x00, PL || PSK || CSuite_Sel || inputString)
+	 * MSK = GKDF-160 (MK, inputString)[0..63]
+	 * EMSK = GKDF-160 (MK, inputString)[64..127]
+	 * SK = GKDF-160 (MK, inputString)[128..143]
+	 * PK = GKDF-160 (MK, inputString)[144..159]
+	 * MID = GKDF-16(0x00, "Method ID" || EAP_Method_Type || CSuite_Sel ||
+	 *               inputString)
+	 * Hash-Function = SHA-1 (see [RFC3174])
+	 * hashlen = 20 octets (160 bits)
 	 */
 
 	os_memset(zero_string, 0, sizeof(zero_string));
@@ -131,16 +124,16 @@
 	wpa_hexdump_key(MSG_DEBUG, "EAP-GPSK: Data to MK derivation (AES)",
 			data, data_len);
 
-	if (eap_gpsk_gkdf_aes(zero_string, data, data_len, mk, sizeof(mk)) < 0)
-	{
+	if (eap_gpsk_gkdf(zero_string, sizeof(zero_string), data, data_len,
+			  mk, sizeof(mk)) < 0) {
 		os_free(data);
 		return -1;
 	}
 	os_free(data);
 	wpa_hexdump_key(MSG_DEBUG, "EAP-GPSK: MK", mk, sizeof(mk));
 
-	if (eap_gpsk_gkdf_aes(mk, seed, seed_len, kdf_out, sizeof(kdf_out)) <
-	    0)
+	if (eap_gpsk_gkdf(mk, sizeof(mk), seed, seed_len,
+			  kdf_out, sizeof(kdf_out)) < 0)
 		return -1;
 
 	pos = kdf_out;
@@ -166,40 +159,32 @@
 
 
 #ifdef EAP_GPSK_SHA256
-static int eap_gpsk_gkdf_sha256(const u8 *psk, size_t psk_len,
-				const u8 *data, size_t data_len,
-				u8 *buf, size_t len)
+static int eap_gpsk_gkdf_sha256(const u8 *psk /* Y */, size_t psk_len,
+				const u8 *data /* Z */, size_t data_len,
+				u8 *buf, size_t len /* X */)
 {
 	u8 *opos;
-	size_t i, n, size, left, clen;
-	u8 ibuf[2], lenbuf[2], hash[SHA256_MAC_LEN];
-	const u8 *addr[4];
-	size_t vlen[4];
-
-	size = SHA256_MAC_LEN;
-	addr[0] = hash;
-	vlen[0] = size;
-	addr[1] = data;
-	vlen[1] = data_len;
-	addr[2] = ibuf;
-	vlen[2] = sizeof(ibuf);
-	addr[3] = lenbuf;
-	vlen[3] = sizeof(lenbuf);
-
-	WPA_PUT_BE16(lenbuf, len);
+	size_t i, n, hashlen, left, clen;
+	u8 ibuf[2], hash[SHA256_MAC_LEN];
+	const u8 *addr[3];
+	size_t vlen[3];
+
+	hashlen = SHA256_MAC_LEN;
+	/* M_i = Hash-Function (i || Y || Z); */
+	addr[0] = ibuf;
+	vlen[0] = sizeof(ibuf);
+	addr[1] = psk;
+	vlen[1] = psk_len;
+	addr[2] = data;
+	vlen[2] = data_len;
 
 	opos = buf;
 	left = len;
-	n = (len + size - 1) / size;
+	n = (len + hashlen - 1) / hashlen;
 	for (i = 1; i <= n; i++) {
 		WPA_PUT_BE16(ibuf, i);
-		if (i > 1)
-			hmac_sha256_vector(psk, psk_len, 4, addr, vlen, hash);
-		else
-			hmac_sha256_vector(psk, psk_len, 3, addr + 1, vlen + 1,
-					   hash);
-
-		clen = left > size ? size : left;
+		sha256_vector(3, addr, vlen, hash);
+		clen = left > hashlen ? hashlen : left;
 		os_memcpy(opos, hash, clen);
 		opos += clen;
 		left -= clen;
@@ -217,7 +202,7 @@
 {
 #define EAP_GPSK_SK_LEN_SHA256 SHA256_MAC_LEN
 #define EAP_GPSK_PK_LEN_SHA256 SHA256_MAC_LEN
-	u8 mk[SHA256_MAC_LEN], zero_string[SHA256_MAC_LEN], *pos, *data;
+	u8 mk[SHA256_MAC_LEN], zero_string[1], *pos, *data;
 	u8 kdf_out[EAP_MSK_LEN + EAP_EMSK_LEN + EAP_GPSK_SK_LEN_SHA256 +
 		   EAP_GPSK_PK_LEN_SHA256];
 	size_t data_len;
@@ -226,14 +211,15 @@
 	 * inputString = RAND_Client || ID_Client || RAND_Server || ID_Server
 	 *            (= seed)
 	 * KS = 32, PL = psk_len, CSuite_Sel = 0x000000 0x000002
-	 * MK = GKDF-32(Zero-String, PL || PSK || CSuite_Sel || inputString)
-	 * KDF_out = GKDF-192(MK, inputString)
-	 * MSK = KDF_out[0..63]
-	 * EMSK = KDF_out[64..127]
-	 * SK = KDF_out[128..159]
-	 * PK = KDF_out[160..191]
-	 * MID = GKDF-16(Zero-String, "Method ID" || EAP_Method_Type ||
-	 *               CSuite_Sel || inputString)
+	 * MK = GKDF-32 (0x00, PL || PSK || CSuite_Sel || inputString)
+	 * MSK = GKDF-192 (MK, inputString)[0..63]
+	 * EMSK = GKDF-192 (MK, inputString)[64..127]
+	 * SK = GKDF-192 (MK, inputString)[128..159]
+	 * PK = GKDF-192 (MK, inputString)[160..191]
+	 * MID = GKDF-16(0x00, "Method ID" || EAP_Method_Type || CSuite_Sel ||
+	 *               inputString)
+	 * Hash-Function = SHA256 (see [RFC4634])
+	 * hashlen = 32 octets (256 bits)
 	 */
 
 	os_memset(zero_string, 0, sizeof(zero_string));

Modified: hostapd/trunk/eap_gpsk_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_gpsk_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_gpsk_common.h (original)
+++ hostapd/trunk/eap_gpsk_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-GPSK shared routines
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -19,6 +19,13 @@
 #define EAP_GPSK_OPCODE_GPSK_2 2
 #define EAP_GPSK_OPCODE_GPSK_3 3
 #define EAP_GPSK_OPCODE_GPSK_4 4
+#define EAP_GPSK_OPCODE_FAIL 5
+#define EAP_GPSK_OPCODE_PROTECTED_FAIL 6
+
+/* Failure-Code in GPSK-Fail and GPSK-Protected-Fail */
+#define EAP_GPSK_FAIL_PSK_NOT_FOUND 0x00000001
+#define EAP_GPSK_FAIL_AUTHENTICATION_FAILURE 0x00000002
+#define EAP_GPSK_FAIL_AUTHORIZATION_FAILURE 0x00000003
 
 #define EAP_GPSK_RAND_LEN 32
 #define EAP_GPSK_MAX_SK_LEN 32

Modified: hostapd/trunk/eap_gtc.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_gtc.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_gtc.c (original)
+++ hostapd/trunk/eap_gtc.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-GTC (RFC 3748)
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_i.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_i.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_i.h (original)
+++ hostapd/trunk/eap_i.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP Authenticator state machine internal structures (RFC 4137)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_identity.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_identity.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_identity.c (original)
+++ hostapd/trunk/eap_identity.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-Identity
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_md5.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_md5.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_md5.c (original)
+++ hostapd/trunk/eap_md5.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-MD5 server
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_methods.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_methods.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_methods.c (original)
+++ hostapd/trunk/eap_methods.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP method registration
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_methods.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_methods.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_methods.h (original)
+++ hostapd/trunk/eap_methods.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP method registration
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_mschapv2.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_mschapv2.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_mschapv2.c (original)
+++ hostapd/trunk/eap_mschapv2.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-MSCHAPv2 (draft-kamath-pppext-eap-mschapv2-00.txt) server
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -133,7 +133,7 @@
 	char *message = "OK";
 	size_t ms_len;
 
-	ms_len = sizeof(*ms) + 2 + 2 * sizeof(data->auth_response) + 2 +
+	ms_len = sizeof(*ms) + 2 + 2 * sizeof(data->auth_response) + 1 + 2 +
 		strlen(message);
 	req = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, reqDataLen,
 			    ms_len, EAP_CODE_REQUEST, id, &pos);
@@ -156,6 +156,7 @@
 					  sizeof(data->auth_response) * 2 + 1,
 					  data->auth_response,
 					  sizeof(data->auth_response));
+	*pos++ = ' ';
 	*pos++ = 'M';
 	*pos++ = '=';
 	memcpy(pos, message, strlen(message));

Modified: hostapd/trunk/eap_pax.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_pax.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_pax.c (original)
+++ hostapd/trunk/eap_pax.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
- * hostapd / EAP-PAX (draft-clancy-eap-pax-11.txt) server
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * hostapd / EAP-PAX (RFC 4746) server
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_pax_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_pax_common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_pax_common.c (original)
+++ hostapd/trunk/eap_pax_common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-PAX shared routines
- * Copyright (c) 2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -31,7 +31,7 @@
  * @output: Buffer for the derived key
  * Returns: 0 on success, -1 failed
  *
- * draft-clancy-eap-pax-04.txt, chap. 2.5: PAX-KDF-W(X, Y, Z)
+ * RFC 4746, Section 2.6: PAX-KDF-W(X, Y, Z)
  */
 int eap_pax_kdf(u8 mac_id, const u8 *key, size_t key_len,
 		const char *identifier,

Modified: hostapd/trunk/eap_pax_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_pax_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_pax_common.h (original)
+++ hostapd/trunk/eap_pax_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-PAX shared routines
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_peap.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_peap.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_peap.c (original)
+++ hostapd/trunk/eap_peap.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-PEAP (draft-josefsson-pppext-eap-tls-eap-07.txt)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -339,12 +339,11 @@
 {
 	struct eap_hdr *resp;
 	u8 *pos;
-	size_t len;
 
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	if (respDataLen < sizeof(*resp) + 2 || *pos != EAP_TYPE_PEAP ||
-	    (len = ntohs(resp->length)) > respDataLen) {
+	    (ntohs(resp->length)) > respDataLen) {
 		wpa_printf(MSG_INFO, "EAP-PEAP: Invalid frame");
 		return TRUE;
 	}

Modified: hostapd/trunk/eap_psk.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_psk.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_psk.c (original)
+++ hostapd/trunk/eap_psk.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
- * hostapd / EAP-PSK (draft-bersani-eap-psk-11.txt) server
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * hostapd / EAP-PSK (RFC 4764) server
+ * Copyright (c) 2005-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_psk_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_psk_common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_psk_common.c (original)
+++ hostapd/trunk/eap_psk_common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-PSK shared routines
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_psk_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_psk_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_psk_common.h (original)
+++ hostapd/trunk/eap_psk_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-PSK shared routines
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_sake.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sake.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sake.c (original)
+++ hostapd/trunk/eap_sake.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-SAKE (RFC 4763) server
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_sake_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sake_common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sake_common.c (original)
+++ hostapd/trunk/eap_sake_common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-SAKE shared routines
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_sake_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sake_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sake_common.h (original)
+++ hostapd/trunk/eap_sake_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-SAKE shared routines
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_sim.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sim.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sim.c (original)
+++ hostapd/trunk/eap_sim.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-SIM (RFC 4186)
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -269,12 +269,11 @@
 	struct eap_sim_data *data = priv;
 	struct eap_hdr *resp;
 	u8 *pos, subtype;
-	size_t len;
 
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	if (respDataLen < sizeof(*resp) + 4 || *pos != EAP_TYPE_SIM ||
-	    (len = ntohs(resp->length)) > respDataLen) {
+	    (ntohs(resp->length)) > respDataLen) {
 		wpa_printf(MSG_INFO, "EAP-SIM: Invalid frame");
 		return TRUE;
 	}

Modified: hostapd/trunk/eap_sim_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sim_common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sim_common.c (original)
+++ hostapd/trunk/eap_sim_common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP peer: EAP-SIM/AKA shared routines
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -145,11 +145,15 @@
 		wpa_printf(MSG_ERROR, "EAP-SIM: Failed to derive keys");
 		return -1;
 	}
-	os_memcpy(msk, buf, EAP_SIM_KEYING_DATA_LEN);
-	os_memcpy(emsk, buf + EAP_SIM_KEYING_DATA_LEN, EAP_EMSK_LEN);
-	wpa_hexdump(MSG_DEBUG, "EAP-SIM: keying material (MSK)",
-		    msk, EAP_SIM_KEYING_DATA_LEN);
-	wpa_hexdump(MSG_DEBUG, "EAP-SIM: EMSK", emsk, EAP_EMSK_LEN);
+	if (msk) {
+		os_memcpy(msk, buf, EAP_SIM_KEYING_DATA_LEN);
+		wpa_hexdump(MSG_DEBUG, "EAP-SIM: keying material (MSK)",
+			    msk, EAP_SIM_KEYING_DATA_LEN);
+	}
+	if (emsk) {
+		os_memcpy(emsk, buf + EAP_SIM_KEYING_DATA_LEN, EAP_EMSK_LEN);
+		wpa_hexdump(MSG_DEBUG, "EAP-SIM: EMSK", emsk, EAP_EMSK_LEN);
+	}
 	os_memset(buf, 0, sizeof(buf));
 
 	return 0;
@@ -180,7 +184,14 @@
 	/* HMAC-SHA1-128 */
 	os_memcpy(tmp, req, req_len);
 	os_memset(tmp + (mac - req), 0, EAP_SIM_MAC_LEN);
+	wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Verify MAC - msg", tmp, req_len);
+	wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Verify MAC - extra data",
+		    extra, extra_len);
+	wpa_hexdump_key(MSG_MSGDUMP, "EAP-SIM: Verify MAC - K_aut",
+			k_aut, EAP_SIM_K_AUT_LEN);
 	hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
+	wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Verify MAC: MAC",
+		    hmac, EAP_SIM_MAC_LEN);
 	os_free(tmp);
 
 	return (os_memcmp(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
@@ -201,8 +212,15 @@
 
 	/* HMAC-SHA1-128 */
 	os_memset(mac, 0, EAP_SIM_MAC_LEN);
+	wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Add MAC - msg", msg, msg_len);
+	wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Add MAC - extra data",
+		    extra, extra_len);
+	wpa_hexdump_key(MSG_MSGDUMP, "EAP-SIM: Add MAC - K_aut",
+			k_aut, EAP_SIM_K_AUT_LEN);
 	hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
 	os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
+	wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Add MAC: MAC",
+		    mac, EAP_SIM_MAC_LEN);
 }
 
 
@@ -380,6 +398,22 @@
 			attr->counter = apos[0] * 256 + apos[1];
 			wpa_printf(MSG_DEBUG, "EAP-SIM: (encr) AT_COUNTER %d",
 				   attr->counter);
+			break;
+		case EAP_SIM_AT_COUNTER_TOO_SMALL:
+			if (!encr) {
+				wpa_printf(MSG_ERROR, "EAP-SIM: Unencrypted "
+					   "AT_COUNTER_TOO_SMALL");
+				return -1;
+			}
+			if (alen != 2) {
+				wpa_printf(MSG_INFO, "EAP-SIM: (encr) Invalid "
+					   "AT_COUNTER_TOO_SMALL (alen=%lu)",
+					   (unsigned long) alen);
+				return -1;
+			}
+			wpa_printf(MSG_DEBUG, "EAP-SIM: (encr) "
+				   "AT_COUNTER_TOO_SMALL");
+			attr->counter_too_small = 1;
 			break;
 		case EAP_SIM_AT_NONCE_S:
 			if (!encr) {

Modified: hostapd/trunk/eap_sim_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sim_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sim_common.h (original)
+++ hostapd/trunk/eap_sim_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP peer: EAP-SIM/AKA shared routines
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -135,6 +135,7 @@
 	size_t next_pseudonym_len, next_reauth_id_len, identity_len, res_len;
 	enum eap_sim_id_req id_req;
 	int notification, counter, selected_version, client_error_code;
+	int counter_too_small;
 };
 
 int eap_sim_parse_attr(const u8 *start, const u8 *end,

Modified: hostapd/trunk/eap_sim_db.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sim_db.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sim_db.c (original)
+++ hostapd/trunk/eap_sim_db.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-SIM database/authenticator gateway
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_sim_db.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_sim_db.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_sim_db.h (original)
+++ hostapd/trunk/eap_sim_db.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-SIM database/authenticator gateway
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_tls.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_tls.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_tls.c (original)
+++ hostapd/trunk/eap_tls.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-TLS (RFC 2716)
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -130,12 +130,11 @@
 {
 	struct eap_hdr *resp;
 	u8 *pos;
-	size_t len;
 
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	if (respDataLen < sizeof(*resp) + 2 || *pos != EAP_TYPE_TLS ||
-	    (len = ntohs(resp->length)) > respDataLen) {
+	    (ntohs(resp->length)) > respDataLen) {
 		wpa_printf(MSG_INFO, "EAP-TLS: Invalid frame");
 		return TRUE;
 	}

Modified: hostapd/trunk/eap_tls_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_tls_common.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_tls_common.c (original)
+++ hostapd/trunk/eap_tls_common.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-TLS/PEAP/TTLS common functions
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_tls_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_tls_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_tls_common.h (original)
+++ hostapd/trunk/eap_tls_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-TLS/PEAP/TTLS common functions
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_tlv.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_tlv.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_tlv.c (original)
+++ hostapd/trunk/eap_tlv.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-TLV (draft-josefsson-pppext-eap-tls-eap-07.txt)
- * Copyright (c) 2004, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -99,12 +99,11 @@
 {
 	struct eap_hdr *resp;
 	u8 *pos;
-	size_t len;
 
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	if (respDataLen < sizeof(*resp) + 1 || *pos != EAP_TYPE_TLV ||
-	    (len = ntohs(resp->length)) > respDataLen) {
+	    (ntohs(resp->length)) > respDataLen) {
 		wpa_printf(MSG_INFO, "EAP-TLV: Invalid frame");
 		return TRUE;
 	}
@@ -119,14 +118,12 @@
 	struct eap_tlv_data *data = priv;
 	struct eap_hdr *resp;
 	u8 *pos;
-	int len;
 	size_t left;
 	u8 *result_tlv = NULL;
 	size_t result_tlv_len = 0;
 	int tlv_type, mandatory, tlv_len;
 
 	resp = (struct eap_hdr *) respData;
-	len = ntohs(resp->length);
 	pos = (u8 *) (resp + 1);
 
 	/* Parse TLVs */

Modified: hostapd/trunk/eap_ttls.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_ttls.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_ttls.c (original)
+++ hostapd/trunk/eap_ttls.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / EAP-TTLS (draft-ietf-pppext-eap-ttls-05.txt)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -651,12 +651,11 @@
 {
 	struct eap_hdr *resp;
 	u8 *pos;
-	size_t len;
 
 	resp = (struct eap_hdr *) respData;
 	pos = (u8 *) (resp + 1);
 	if (respDataLen < sizeof(*resp) + 2 || *pos != EAP_TYPE_TTLS ||
-	    (len = ntohs(resp->length)) > respDataLen) {
+	    (ntohs(resp->length)) > respDataLen) {
 		wpa_printf(MSG_INFO, "EAP-TTLS: Invalid frame");
 		return TRUE;
 	}
@@ -865,7 +864,7 @@
 					     size_t challenge_len,
 					     u8 *response, size_t response_len)
 {
-	u8 *chal, *username, nt_response[24], *pos, *rx_resp, *peer_challenge,
+	u8 *chal, *username, nt_response[24], *rx_resp, *peer_challenge,
 		*auth_challenge;
 	size_t username_len, i;
 
@@ -894,7 +893,6 @@
 	 * (if present). */
 	username = sm->identity;
 	username_len = sm->identity_len;
-	pos = username;
 	for (i = 0; i < username_len; i++) {
 		if (username[i] == '\\') {
 			username_len -= i + 1;

Modified: hostapd/trunk/eap_ttls.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_ttls.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_ttls.h (original)
+++ hostapd/trunk/eap_ttls.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * EAP server/peer: EAP-TTLS (draft-ietf-pppext-eap-ttls-03.txt)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eap_vendor_test.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eap_vendor_test.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eap_vendor_test.c (original)
+++ hostapd/trunk/eap_vendor_test.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Test method for vendor specific (expanded) EAP type
- * Copyright (c) 2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eapol_sm.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eapol_sm.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eapol_sm.c (original)
+++ hostapd/trunk/eapol_sm.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.1X Authenticator - EAPOL state machine
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eapol_sm.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eapol_sm.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eapol_sm.h (original)
+++ hostapd/trunk/eapol_sm.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.1X Authenticator - EAPOL state machine
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eloop.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eloop.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eloop.c (original)
+++ hostapd/trunk/eloop.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * Event loop based on select() loop
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eloop.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eloop.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eloop.h (original)
+++ hostapd/trunk/eloop.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * Event loop
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eloop_none.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eloop_none.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eloop_none.c (original)
+++ hostapd/trunk/eloop_none.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * Event loop - empty template (basic structure, but no OS specific operations)
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/eloop_win.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/eloop_win.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/eloop_win.c (original)
+++ hostapd/trunk/eloop_win.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * Event loop based on Windows events and WaitForMultipleObjects
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/hlr_auc_gw.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hlr_auc_gw.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hlr_auc_gw.c (original)
+++ hostapd/trunk/hlr_auc_gw.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * HLR/AuC testing gateway for hostapd EAP-SIM/AKA database/authenticator
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -520,7 +520,7 @@
 {
 	printf("HLR/AuC testing gateway for hostapd EAP-SIM/AKA "
 	       "database/authenticator\n"
-	       "Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>\n"
+	       "Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>\n"
 	       "\n"
 	       "usage:\n"
 	       "hlr_auc_gw [-h] [-s<socket path>] [-g<triplet file>] "

Modified: hostapd/trunk/hostap_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostap_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostap_common.h (original)
+++ hostapd/trunk/hostap_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Kernel driver communication with Linux Host AP driver
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/hostapd.8
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostapd.8?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostapd.8 (original)
+++ hostapd/trunk/hostapd.8 Fri Jun  1 11:05:09 2007
@@ -53,7 +53,7 @@
 .SH SEE ALSO
 .BR hostapd_cli (1).
 .SH AUTHOR
-hostapd was written by Jouni Malinen <jkmaline at cc.hut.fi>. 
+hostapd was written by Jouni Malinen <j at w1.fi>. 
 .PP
 This manual page was written by Faidon Liambotis <faidon at cube.gr>,
 for the Debian project (but may be used by others).

Modified: hostapd/trunk/hostapd.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostapd.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostapd.c (original)
+++ hostapd/trunk/hostapd.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Initialization and configuration
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -680,6 +680,9 @@
 			printf("Could not set WEP encryption.\n");
 			return -1;
 		}
+		if (hapd->conf->ssid.wep.key[i] &&
+		    i == hapd->conf->ssid.wep.idx)
+			hostapd_set_privacy(hapd, 1);
 	}
 
 	return 0;
@@ -1219,6 +1222,7 @@
 	u8 *prev_addr;
 
 	hostapd_flush_old_stations(hapd);
+	hostapd_set_privacy(hapd, 0);
 
 	if (hapd->iconf->channel) {
 		freq = hostapd_hw_get_freq(hapd, hapd->iconf->channel);
@@ -1572,7 +1576,7 @@
 		"hostapd v" VERSION_STR "\n"
 		"User space daemon for IEEE 802.11 AP management,\n"
 		"IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n"
-		"Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi> "
+		"Copyright (c) 2002-2007, Jouni Malinen <j at w1.fi> "
 		"and contributors\n");
 }
 

Modified: hostapd/trunk/hostapd.eap_user
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostapd.eap_user?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostapd.eap_user (original)
+++ hostapd/trunk/hostapd.eap_user Fri Jun  1 11:05:09 2007
@@ -1,5 +1,5 @@
 # hostapd user database for integrated EAP authenticator
-E
+
 # Each line must contain an identity, EAP method(s), and an optional password
 # separated with whitespace (space or tab). The identity and password must be
 # double quoted ("user"). Password can alternatively be stored as

Modified: hostapd/trunk/hostapd.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostapd.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostapd.h (original)
+++ hostapd/trunk/hostapd.h Fri Jun  1 11:05:09 2007
@@ -1,7 +1,7 @@
 /*
  * hostapd / Initialization and configuration
  * Host AP kernel driver
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/hostapd_cli.1
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostapd_cli.1?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostapd_cli.1 (original)
+++ hostapd/trunk/hostapd_cli.1 Fri Jun  1 11:05:09 2007
@@ -77,7 +77,7 @@
 .SH SEE ALSO
 .BR hostapd (8).
 .SH AUTHOR
-hostapd_cli was written by Jouni Malinen <jkmaline at cc.hut.fi>. 
+hostapd_cli was written by Jouni Malinen <j at w1.fi>. 
 .PP
 This manual page was written by Faidon Liambotis <faidon at cube.gr>,
 for the Debian project (but may be used by others).

Modified: hostapd/trunk/hostapd_cli.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/hostapd_cli.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/hostapd_cli.c (original)
+++ hostapd/trunk/hostapd_cli.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - command line interface for hostapd daemon
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -21,7 +21,7 @@
 
 static const char *hostapd_cli_version =
 "hostapd_cli v" VERSION_STR "\n"
-"Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi> and contributors";
+"Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi> and contributors";
 
 
 static const char *hostapd_cli_license =

Modified: hostapd/trunk/iapp.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/iapp.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/iapp.c (original)
+++ hostapd/trunk/iapp.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11F-2003 Inter-Access Point Protocol (IAPP)
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -527,10 +527,7 @@
 		  struct hostapd_bss_config *oldbss)
 {
 	if (hapd->conf->ieee802_11f != oldbss->ieee802_11f ||
-	    (hapd->conf->iapp_iface && !oldbss->iapp_iface) ||
-	    (!hapd->conf->iapp_iface && oldbss->iapp_iface) ||
-	    (hapd->conf->iapp_iface &&
-	     strcmp(hapd->conf->iapp_iface, oldbss->iapp_iface) != 0)) {
+	    strcmp(hapd->conf->iapp_iface, oldbss->iapp_iface) != 0) {
 
 		iapp_deinit(hapd->iapp);
 		hapd->iapp = NULL;

Modified: hostapd/trunk/iapp.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/iapp.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/iapp.h (original)
+++ hostapd/trunk/iapp.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11F-2003 Inter-Access Point Protocol (IAPP)
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ieee802_11.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_11.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_11.c (original)
+++ hostapd/trunk/ieee802_11.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11 Management
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1268,6 +1268,22 @@
 		       HOSTAPD_LEVEL_DEBUG,
 		       "handle_action - unknown action category %d",
 		       mgmt->u.action.category);
+	if (!(mgmt->da[0] & 0x01) && !(mgmt->u.action.category & 0x80) &&
+	    !(mgmt->sa[0] & 0x01)) {
+		/*
+		 * IEEE 802.11-REVma/D9.0 - 7.3.1.11
+		 * Return the Action frame to the source without change
+		 * except that MSB of the Category set to 1.
+		 */
+		wpa_printf(MSG_DEBUG, "IEEE 802.11: Return unknown Action "
+			   "frame back to sender");
+		os_memcpy(mgmt->da, mgmt->sa, ETH_ALEN);
+		os_memcpy(mgmt->sa, hapd->own_addr, ETH_ALEN);
+		os_memcpy(mgmt->bssid, hapd->own_addr, ETH_ALEN);
+		mgmt->u.action.category |= 0x80;
+
+		hostapd_send_mgmt_frame(hapd, mgmt, len, 0);
+	}
 }
 
 

Modified: hostapd/trunk/ieee802_11.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_11.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_11.h (original)
+++ hostapd/trunk/ieee802_11.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11 Management
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ieee802_11_auth.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_11_auth.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_11_auth.c (original)
+++ hostapd/trunk/ieee802_11_auth.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11 authentication (ACL)
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ieee802_11_auth.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_11_auth.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_11_auth.h (original)
+++ hostapd/trunk/ieee802_11_auth.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11 authentication (ACL)
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ieee802_11h.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_11h.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_11h.c (original)
+++ hostapd/trunk/ieee802_11h.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,7 @@
 /*
  * hostapd / IEEE 802.11h
- * Copyright 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -19,14 +20,13 @@
 
 int hostapd_check_power_cap(struct hostapd_data *hapd, u8 *power, u8 len)
 {
-	unsigned int min_pwr, max_pwr;
+	unsigned int max_pwr;
 
 	if (len < 2) {
 		HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL,
 			      "Too short power capability IE\n");
 		return -1;
 	}
-	min_pwr = power[0];
 	max_pwr = power[1];
 	if (max_pwr > hapd->iface->sta_max_power)
 		return -1;

Modified: hostapd/trunk/ieee802_11h.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_11h.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_11h.h (original)
+++ hostapd/trunk/ieee802_11h.h Fri Jun  1 11:05:09 2007
@@ -1,7 +1,16 @@
 /*
  * hostapd / IEEE 802.11h
- * Copyright 2005-2006, Devicescape Software, Inc.
- * All Rights Reserved.
+ * Copyright (c) 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2007, Jouni Malinen <j at w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
  */
 
 #ifndef IEEE802_11H_H

Modified: hostapd/trunk/ieee802_1x.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_1x.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_1x.c (original)
+++ hostapd/trunk/ieee802_1x.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.1X Authenticator
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1668,8 +1668,7 @@
 
 		if (hapd->default_wep_key == NULL)
 			return -1;
-	} else
-		hostapd_set_privacy(hapd, 0);
+	}
 
 	return 0;
 }

Modified: hostapd/trunk/ieee802_1x.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ieee802_1x.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ieee802_1x.h (original)
+++ hostapd/trunk/ieee802_1x.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.1X Authenticator
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/includes.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/includes.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/includes.h (original)
+++ hostapd/trunk/includes.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd - Default include files
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/l2_packet.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet.h (original)
+++ hostapd/trunk/l2_packet.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet interface definition
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/l2_packet_freebsd.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet_freebsd.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet_freebsd.c (original)
+++ hostapd/trunk/l2_packet_freebsd.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet handling with FreeBSD
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  * Copyright (c) 2005, Sam Leffler <sam at errno.com>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -28,6 +28,9 @@
 #include "eloop.h"
 #include "l2_packet.h"
 
+
+static const u8 pae_group_addr[ETH_ALEN] =
+{ 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03 };
 
 struct l2_packet_data {
 	pcap_t *pcap;
@@ -99,7 +102,7 @@
 				  unsigned short protocol)
 {
 	bpf_u_int32 pcap_maskp, pcap_netp;
-	char pcap_filter[100], pcap_err[PCAP_ERRBUF_SIZE];
+	char pcap_filter[200], pcap_err[PCAP_ERRBUF_SIZE];
 	struct bpf_program pcap_fp;
 
 	pcap_lookupnet(l2->ifname, &pcap_netp, &pcap_maskp, pcap_err);
@@ -111,13 +114,17 @@
 	}
 	if (pcap_datalink(l2->pcap) != DLT_EN10MB &&
 	    pcap_set_datalink(l2->pcap, DLT_EN10MB) < 0) {
-		fprintf(stderr, "pcap_set_datalinke(DLT_EN10MB): %s\n",
+		fprintf(stderr, "pcap_set_datalink(DLT_EN10MB): %s\n",
 			pcap_geterr(l2->pcap));
 		return -1;
 	}
 	os_snprintf(pcap_filter, sizeof(pcap_filter),
-		    "ether dst " MACSTR " and ether proto 0x%x",
-		    MAC2STR(l2->own_addr), protocol);
+		    "not ether src " MACSTR " and "
+		    "( ether dst " MACSTR " or ether dst " MACSTR " ) and "
+		    "ether proto 0x%x",
+		    MAC2STR(l2->own_addr), /* do not receive own packets */
+		    MAC2STR(l2->own_addr), MAC2STR(pae_group_addr),
+		    protocol);
 	if (pcap_compile(l2->pcap, &pcap_fp, pcap_filter, 1, pcap_netp) < 0) {
 		fprintf(stderr, "pcap_compile: %s\n", pcap_geterr(l2->pcap));
 		return -1;

Modified: hostapd/trunk/l2_packet_linux.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet_linux.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet_linux.c (original)
+++ hostapd/trunk/l2_packet_linux.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet handling with Linux packet sockets
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/l2_packet_ndis.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet_ndis.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet_ndis.c (original)
+++ hostapd/trunk/l2_packet_ndis.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet handling with Microsoft NDISUIO
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/l2_packet_none.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet_none.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet_none.c (original)
+++ hostapd/trunk/l2_packet_none.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet handling example with dummy functions
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/l2_packet_pcap.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet_pcap.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet_pcap.c (original)
+++ hostapd/trunk/l2_packet_pcap.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet handling with libpcap/libdnet and WinPcap
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -229,7 +229,7 @@
 	}
 	if (pcap_datalink(l2->pcap) != DLT_EN10MB &&
 	    pcap_set_datalink(l2->pcap, DLT_EN10MB) < 0) {
-		fprintf(stderr, "pcap_set_datalinke(DLT_EN10MB): %s\n",
+		fprintf(stderr, "pcap_set_datalink(DLT_EN10MB): %s\n",
 			pcap_geterr(l2->pcap));
 		return -1;
 	}

Modified: hostapd/trunk/l2_packet_winpcap.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/l2_packet_winpcap.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/l2_packet_winpcap.c (original)
+++ hostapd/trunk/l2_packet_winpcap.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Layer2 packet handling with WinPcap RX thread
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/md4.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/md4.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/md4.c (original)
+++ hostapd/trunk/md4.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * MD4 hash implementation
- * Copyright (c) 2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/md5.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/md5.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/md5.c (original)
+++ hostapd/trunk/md5.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * MD5 hash implementation and interface functions
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/md5.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/md5.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/md5.h (original)
+++ hostapd/trunk/md5.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * MD5 hash implementation and interface functions
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/milenage.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/milenage.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/milenage.c (original)
+++ hostapd/trunk/milenage.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * 3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
- * Copyright (c) 2006 <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006 <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/milenage.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/milenage.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/milenage.h (original)
+++ hostapd/trunk/milenage.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
- * Copyright (c) 2006 <jkmaline at cc.hut.fi>
+ * Copyright (c) 2006 <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/mlme.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/mlme.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/mlme.c (original)
+++ hostapd/trunk/mlme.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11 MLME
- * Copyright 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright 2003-2006, Jouni Malinen <j at w1.fi>
  * Copyright 2003-2004, Instant802 Networks, Inc.
  * Copyright 2005-2006, Devicescape Software, Inc.
  *

Modified: hostapd/trunk/mlme.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/mlme.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/mlme.h (original)
+++ hostapd/trunk/mlme.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / IEEE 802.11 MLME
- * Copyright 2003, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright 2003, Jouni Malinen <j at w1.fi>
  * Copyright 2003-2004, Instant802 Networks, Inc.
  * Copyright 2005-2006, Devicescape Software, Inc.
  *

Modified: hostapd/trunk/ms_funcs.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ms_funcs.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ms_funcs.c (original)
+++ hostapd/trunk/ms_funcs.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / shared MSCHAPV2 helper functions / RFC 2433 / RFC 2759
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/ms_funcs.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/ms_funcs.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/ms_funcs.h (original)
+++ hostapd/trunk/ms_funcs.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / shared MSCHAPV2 helper functions / RFC 2433 / RFC 2759
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/nt_password_hash.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/nt_password_hash.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/nt_password_hash.c (original)
+++ hostapd/trunk/nt_password_hash.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - Plaintext password to NtPasswordHash
- * Copyright (c) 2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/os.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/os.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/os.h (original)
+++ hostapd/trunk/os.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / OS specific functions
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/os_internal.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/os_internal.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/os_internal.c (original)
+++ hostapd/trunk/os_internal.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / Internal implementation of OS specific functions
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/os_none.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/os_none.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/os_none.c (original)
+++ hostapd/trunk/os_none.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / Empty OS specific functions
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/os_unix.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/os_unix.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/os_unix.c (original)
+++ hostapd/trunk/os_unix.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / OS specific functions for UNIX/POSIX systems
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/os_win32.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/os_win32.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/os_win32.c (original)
+++ hostapd/trunk/os_win32.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd / OS specific functions for Win32 systems
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/pmksa_cache.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/pmksa_cache.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/pmksa_cache.c (original)
+++ hostapd/trunk/pmksa_cache.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - PMKSA cache for IEEE 802.11i RSN
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/pmksa_cache.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/pmksa_cache.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/pmksa_cache.h (original)
+++ hostapd/trunk/pmksa_cache.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - PMKSA cache for IEEE 802.11i RSN
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/preauth.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/preauth.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/preauth.c (original)
+++ hostapd/trunk/preauth.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - Authenticator for IEEE 802.11i RSN pre-authentication
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/preauth.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/preauth.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/preauth.h (original)
+++ hostapd/trunk/preauth.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - Authenticator for IEEE 802.11i RSN pre-authentication
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/radius.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/radius.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/radius.c (original)
+++ hostapd/trunk/radius.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS message processing
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/radius.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/radius.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/radius.h (original)
+++ hostapd/trunk/radius.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS message processing
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/radius_client.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/radius_client.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/radius_client.c (original)
+++ hostapd/trunk/radius_client.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS client
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/radius_client.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/radius_client.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/radius_client.h (original)
+++ hostapd/trunk/radius_client.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS client
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/radius_server.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/radius_server.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/radius_server.c (original)
+++ hostapd/trunk/radius_server.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS authentication server
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -60,6 +60,9 @@
 	int last_from_port;
 	struct sockaddr_storage last_from;
 	socklen_t last_fromlen;
+	u8 last_identifier;
+	struct radius_msg *last_reply;
+	u8 last_authenticator[16];
 };
 
 struct radius_client {
@@ -173,16 +176,25 @@
 		free(sess->last_msg);
 	}
 	free(sess->last_from_addr);
+	if (sess->last_reply) {
+		radius_msg_free(sess->last_reply);
+		free(sess->last_reply);
+	}
 	free(sess);
 	data->num_sess--;
 }
 
 
+static void radius_server_session_remove_timeout(void *eloop_ctx,
+						 void *timeout_ctx);
+
 static void radius_server_session_remove(struct radius_server_data *data,
 					 struct radius_session *sess)
 {
 	struct radius_client *client = sess->client;
 	struct radius_session *session, *prev;
+
+	eloop_cancel_timeout(radius_server_session_remove_timeout, data, sess);
 
 	prev = NULL;
 	session = client->sessions;
@@ -202,6 +214,16 @@
 }
 
 
+static void radius_server_session_remove_timeout(void *eloop_ctx,
+						 void *timeout_ctx)
+{
+	struct radius_server_data *data = eloop_ctx;
+	struct radius_session *sess = timeout_ctx;
+	RADIUS_DEBUG("Removing completed session 0x%x", sess->sess_id);
+	radius_server_session_remove(data, sess);
+}
+
+
 static void radius_server_session_timeout(void *eloop_ctx, void *timeout_ctx)
 {
 	struct radius_server_data *data = eloop_ctx;
@@ -433,12 +455,6 @@
 	struct radius_session *sess;
 	struct radius_msg *reply;
 	struct eap_hdr *hdr;
-
-	/*
-	 * TODO: Implement duplicate packet processing
-	 * data->counters.dup_access_requests++;
-	 * client->counters.dup_access_requests++;
-	 */
 
 	if (force_sess)
 		sess = force_sess;
@@ -472,6 +488,29 @@
 		}
 	}
 
+	if (sess->last_from_port == from_port &&
+	    sess->last_identifier == msg->hdr->identifier &&
+	    os_memcmp(sess->last_authenticator, msg->hdr->authenticator, 16) ==
+	    0) {
+		RADIUS_DEBUG("Duplicate message from %s", from_addr);
+		data->counters.dup_access_requests++;
+		client->counters.dup_access_requests++;
+
+		if (sess->last_reply) {
+			res = sendto(data->auth_sock, sess->last_reply->buf,
+				     sess->last_reply->buf_used, 0,
+				     (struct sockaddr *) from, fromlen);
+			if (res < 0) {
+				perror("sendto[RADIUS SRV]");
+			}
+			return 0;
+		}
+
+		RADIUS_DEBUG("No previous reply available for duplicate "
+			     "message");
+		return -1;
+	}
+		      
 	eap = radius_msg_get_eap(msg, &eap_len);
 	if (eap == NULL) {
 		RADIUS_DEBUG("No EAP-Message in RADIUS packet from %s",
@@ -567,16 +606,28 @@
 		if (res < 0) {
 			perror("sendto[RADIUS SRV]");
 		}
-		radius_msg_free(reply);
-		free(reply);
+		if (sess->last_reply) {
+			radius_msg_free(sess->last_reply);
+			free(sess->last_reply);
+		}
+		sess->last_reply = reply;
+		sess->last_from_port = from_port;
+		sess->last_identifier = msg->hdr->identifier;
+		os_memcpy(sess->last_authenticator, msg->hdr->authenticator,
+			  16);
 	} else {
 		data->counters.packets_dropped++;
 		client->counters.packets_dropped++;
 	}
 
 	if (sess->eapSuccess || sess->eapFail) {
-		RADIUS_DEBUG("Removing completed session 0x%x", sess->sess_id);
-		radius_server_session_remove(data, sess);
+		RADIUS_DEBUG("Removing completed session 0x%x after timeout",
+			     sess->sess_id);
+		eloop_cancel_timeout(radius_server_session_remove_timeout,
+				     data, sess);
+		eloop_register_timeout(10, 0,
+				       radius_server_session_remove_timeout,
+				       data, sess);
 	}
 
 	return 0;

Modified: hostapd/trunk/radius_server.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/radius_server.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/radius_server.h (original)
+++ hostapd/trunk/radius_server.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / RADIUS authentication server
- * Copyright (c) 2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/rc4.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/rc4.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/rc4.c (original)
+++ hostapd/trunk/rc4.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * RC4 stream cipher
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/rc4.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/rc4.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/rc4.h (original)
+++ hostapd/trunk/rc4.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * RC4 stream cipher
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/reconfig.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/reconfig.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/reconfig.c (original)
+++ hostapd/trunk/reconfig.c Fri Jun  1 11:05:09 2007
@@ -1,9 +1,17 @@
 /*
  * hostapd / Configuration reloading
- * Copyright 2002-2003, Jouni Malinen <jkmaline at cc.hut.fi>
- * Copyright 2002-2004, Instant802 Networks, Inc.
- * Copyright 2005-2006, Devicescape Software, Inc.
- * All Rights Reserved.
+ * Copyright (c) 2002-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2002-2004, Instant802 Networks, Inc.
+ * Copyright (c) 2005-2006, Devicescape Software, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
  */
 
 #include "includes.h"
@@ -49,13 +57,10 @@
 				     struct sta_info *sta, void *data)
 {
 	struct hostapd_config_change *change = data;
-	struct hostapd_config *newconf, *oldconf;
 	struct hostapd_bss_config *newbss, *oldbss;
 	int deauth = 0;
 	u8 reason = WLAN_REASON_PREV_AUTH_NOT_VALID;
 
-	newconf = change->newconf;
-	oldconf = change->oldconf;
 	newbss = change->newbss;
 	oldbss = change->oldbss;
 	hapd = change->hapd;

Modified: hostapd/trunk/sha1.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/sha1.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/sha1.c (original)
+++ hostapd/trunk/sha1.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * SHA1 hash implementation and interface functions
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -519,11 +519,11 @@
 
 -----------------
 Modified 4/01
-By Jouni Malinen <jkmaline at cc.hut.fi>
+By Jouni Malinen <j at w1.fi>
 Minor changes to match the coding style used in Dynamics.
 
 Modified September 24, 2004
-By Jouni Malinen <jkmaline at cc.hut.fi>
+By Jouni Malinen <j at w1.fi>
 Fixed alignment issue in SHA1Transform when SHA1HANDSOFF is defined.
 
 */

Modified: hostapd/trunk/sha1.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/sha1.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/sha1.h (original)
+++ hostapd/trunk/sha1.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * SHA1 hash implementation and interface functions
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/sha256.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/sha256.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/sha256.c (original)
+++ hostapd/trunk/sha256.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * SHA-256 hash implementation and interface functions
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -32,7 +32,7 @@
 			const u8 *addr[], const size_t *len, u8 *mac)
 {
 	unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */
-	unsigned char tk[20];
+	unsigned char tk[32];
 	const u8 *_addr[6];
 	size_t _len[6], i;
 

Modified: hostapd/trunk/sha256.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/sha256.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/sha256.h (original)
+++ hostapd/trunk/sha256.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * SHA256 hash implementation and interface functions
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/sta_info.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/sta_info.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/sta_info.c (original)
+++ hostapd/trunk/sta_info.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Station table
- * Copyright (c) 2002-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/sta_info.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/sta_info.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/sta_info.h (original)
+++ hostapd/trunk/sta_info.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd / Station table
- * Copyright (c) 2002-2004, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2004, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/state_machine.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/state_machine.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/state_machine.h (original)
+++ hostapd/trunk/state_machine.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd - State machine definitions
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/tls.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/tls.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/tls.h (original)
+++ hostapd/trunk/tls.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / SSL/TLS interface definition
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/tls_gnutls.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/tls_gnutls.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/tls_gnutls.c (original)
+++ hostapd/trunk/tls_gnutls.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / SSL/TLS interface functions for openssl
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -805,13 +805,16 @@
 	keys->client_random = sec->client_random;
 	keys->server_random = sec->server_random;
 #else /* GNUTLS_INTERNAL_STRUCTURE_HACK */
-	keys->client_random = gnutls_session_get_client_random(conn->session);
-	keys->server_random = gnutls_session_get_server_random(conn->session);
+	keys->client_random =
+		(u8 *) gnutls_session_get_client_random(conn->session);
+	keys->server_random =
+		(u8 *) gnutls_session_get_server_random(conn->session);
 	/* No access to master_secret */
 #endif /* GNUTLS_INTERNAL_STRUCTURE_HACK */
 
 #ifdef GNUTLS_IA
-	gnutls_ia_extract_inner_secret(conn->session, conn->inner_secret);
+	gnutls_ia_extract_inner_secret(conn->session,
+				       (char *) conn->inner_secret);
 	keys->inner_secret = conn->inner_secret;
 	keys->inner_secret_len = TLS_MASTER_SIZE;
 #endif /* GNUTLS_IA */
@@ -832,7 +835,7 @@
 		return -1;
 
 	return gnutls_prf(conn->session, os_strlen(label), label,
-			  server_random_first, 0, NULL, out_len, out);
+			  server_random_first, 0, NULL, out_len, (char *) out);
 #else /* LIBGNUTLS_VERSION_NUMBER >= 0x010302 */
 	return -1;
 #endif /* LIBGNUTLS_VERSION_NUMBER >= 0x010302 */
@@ -1030,7 +1033,7 @@
 				     size_t *out_len)
 {
 	return tls_connection_handshake(ssl_ctx, conn, in_data, in_len,
-					out_len);
+					out_len, NULL, NULL);
 }
 
 
@@ -1083,7 +1086,8 @@
 
 #ifdef GNUTLS_IA
 	if (conn->tls_ia) {
-		res = gnutls_ia_recv(conn->session, out_data, out_len);
+		res = gnutls_ia_recv(conn->session, (char *) out_data,
+				     out_len);
 		if (out_len >= 12 &&
 		    (res == GNUTLS_E_WARNING_IA_IPHF_RECEIVED ||
 		     res == GNUTLS_E_WARNING_IA_FPHF_RECEIVED)) {
@@ -1093,7 +1097,7 @@
 
 			res = gnutls_ia_permute_inner_secret(
 				conn->session, conn->session_keys_len,
-				conn->session_keys);
+				(char *) conn->session_keys);
 			if (conn->session_keys) {
 				os_memset(conn->session_keys, 0,
 					  conn->session_keys_len);
@@ -1109,7 +1113,7 @@
 			}
 
 			res = gnutls_ia_verify_endphase(conn->session,
-							out_data);
+							(char *) out_data);
 			if (res == 0) {
 				wpa_printf(MSG_DEBUG, "%s: Correct endphase "
 					   "checksum", __func__);
@@ -1289,7 +1293,7 @@
 
 	ret = gnutls_ia_permute_inner_secret(conn->session,
 					     conn->session_keys_len,
-					     conn->session_keys);
+					     (char *) conn->session_keys);
 	if (conn->session_keys) {
 		os_memset(conn->session_keys, 0, conn->session_keys_len);
 		os_free(conn->session_keys);

Modified: hostapd/trunk/tls_none.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/tls_none.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/tls_none.c (original)
+++ hostapd/trunk/tls_none.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / SSL/TLS interface functions for no TLS case
- * Copyright (c) 2004, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/tls_openssl.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/tls_openssl.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/tls_openssl.c (original)
+++ hostapd/trunk/tls_openssl.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant / SSL/TLS interface functions for openssl
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1105,11 +1105,20 @@
 		}
 
 		if (!X509_STORE_add_cert(ssl_ctx->cert_store, cert)) {
+			unsigned long err = ERR_peek_error();
 			tls_show_errors(MSG_WARNING, __func__,
 					"Failed to add ca_cert_blob to "
 					"certificate store");
-			X509_free(cert);
-			return -1;
+			if (ERR_GET_LIB(err) == ERR_LIB_X509 &&
+			    ERR_GET_REASON(err) ==
+			    X509_R_CERT_ALREADY_IN_HASH_TABLE) {
+				wpa_printf(MSG_DEBUG, "OpenSSL: %s - ignoring "
+					   "cert already in hash table error",
+					   __func__);
+			} else {
+				X509_free(cert);
+				return -1;
+			}
 		}
 		X509_free(cert);
 		wpa_printf(MSG_DEBUG, "OpenSSL: %s - added ca_cert_blob "

Modified: hostapd/trunk/version.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/version.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/version.h (original)
+++ hostapd/trunk/version.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 #ifndef VERSION_H
 #define VERSION_H
 
-#define VERSION_STR "0.5.7"
+#define VERSION_STR "0.5.8"
 
 #endif /* VERSION_H */

Modified: hostapd/trunk/vlan_init.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/vlan_init.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/vlan_init.c (original)
+++ hostapd/trunk/vlan_init.c Fri Jun  1 11:05:09 2007
@@ -636,7 +636,8 @@
 		return NULL;
 	}
 
-	if (eloop_register_read_sock(priv->s, vlan_event_receive, hapd, 0)) {
+	if (eloop_register_read_sock(priv->s, vlan_event_receive, hapd, NULL))
+	{
 		close(priv->s);
 		free(priv);
 		return NULL;

Modified: hostapd/trunk/wireless_copy.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wireless_copy.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wireless_copy.h (original)
+++ hostapd/trunk/wireless_copy.h Fri Jun  1 11:05:09 2007
@@ -204,7 +204,7 @@
  *	- Wireless Event capability in struct iw_range
  *	- Add support for relative TxPower (yick !)
  *
- * V17 to V18 (From Jouni Malinen <jkmaline at cc.hut.fi>)
+ * V17 to V18 (From Jouni Malinen <j at w1.fi>)
  * ----------
  *	- Add support for WPA/WPA2
  *	- Add extended encoding configuration (SIOCSIWENCODEEXT and

Modified: hostapd/trunk/wme.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wme.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wme.c (original)
+++ hostapd/trunk/wme.c Fri Jun  1 11:05:09 2007
@@ -77,8 +77,6 @@
 int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
 {
 	struct wme_information_element *wme;
-	u8 *pos;
-	size_t left;
 
 	wpa_hexdump(MSG_MSGDUMP, "WME IE", eid, len);
 
@@ -100,9 +98,6 @@
 		printf("Unsupported WME IE OUI/Type/Subtype/Version\n");
 		return -1;
 	}
-
-	pos = (u8 *) (wme + 1);
-	left = len - sizeof(*wme);
 
 	return 0;
 }

Modified: hostapd/trunk/wpa.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wpa.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wpa.c (original)
+++ hostapd/trunk/wpa.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - IEEE 802.11i-2004 / WPA Authenticator
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -2567,7 +2567,7 @@
 	struct ieee802_1x_hdr *hdr;
 	struct wpa_eapol_key *key;
 	u16 key_info;
-	int type, ret = 0;
+	int ret = 0;
 	u8 mic[16];
 
 	if (data_len < sizeof(*hdr) + sizeof(*key))
@@ -2576,7 +2576,6 @@
 	hdr = (struct ieee802_1x_hdr *) data;
 	key = (struct wpa_eapol_key *) (hdr + 1);
 	key_info = ntohs(key->key_info);
-	type = key_info & WPA_KEY_INFO_TYPE_MASK;
 	memcpy(mic, key->key_mic, 16);
 	memset(key->key_mic, 0, 16);
 	if (wpa_calc_eapol_key_mic(key_info & WPA_KEY_INFO_TYPE_MASK,

Modified: hostapd/trunk/wpa.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wpa.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wpa.h (original)
+++ hostapd/trunk/wpa.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * hostapd - IEEE 802.11i-2004 / WPA Authenticator
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/wpa_common.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wpa_common.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wpa_common.h (original)
+++ hostapd/trunk/wpa_common.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * WPA definitions shared between hostapd and wpa_supplicant
- * Copyright (c) 2002-2005, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2002-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

Modified: hostapd/trunk/wpa_ctrl.c
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wpa_ctrl.c?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wpa_ctrl.c (original)
+++ hostapd/trunk/wpa_ctrl.c Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd control interface library
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -288,13 +288,12 @@
 int wpa_ctrl_pending(struct wpa_ctrl *ctrl)
 {
 	struct timeval tv;
-	int res;
 	fd_set rfds;
 	tv.tv_sec = 0;
 	tv.tv_usec = 0;
 	FD_ZERO(&rfds);
 	FD_SET(ctrl->s, &rfds);
-	res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
+	select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
 	return FD_ISSET(ctrl->s, &rfds);
 }
 

Modified: hostapd/trunk/wpa_ctrl.h
URL: http://svn.debian.org/wsvn/pkg-wpa/hostapd/trunk/wpa_ctrl.h?rev=843&op=diff
==============================================================================
--- hostapd/trunk/wpa_ctrl.h (original)
+++ hostapd/trunk/wpa_ctrl.h Fri Jun  1 11:05:09 2007
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant/hostapd control interface library
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline at cc.hut.fi>
+ * Copyright (c) 2004-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as




More information about the Pkg-wpa-devel mailing list