diff options
author | sam <sam@FreeBSD.org> | 2005-06-13 17:00:32 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-06-13 17:00:32 +0000 |
commit | ef42ed26e06c009171784bf0997f11217b9834eb (patch) | |
tree | 18ae0a3208c2bd6deca4a00de224f56b72b05ec2 | |
parent | 959b8ed2235be426030cda2be478aef5c8ae7577 (diff) | |
parent | d1a1fd4aa94cd9c5cb443c4c1337f91c8c46fde0 (diff) | |
download | FreeBSD-src-ef42ed26e06c009171784bf0997f11217b9834eb.zip FreeBSD-src-ef42ed26e06c009171784bf0997f11217b9834eb.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r147341,
which included commits to RCS files with non-trunk default branches.
-rw-r--r-- | contrib/hostapd/ChangeLog | 14 | ||||
-rw-r--r-- | contrib/hostapd/Makefile | 2 | ||||
-rw-r--r-- | contrib/hostapd/common.h | 4 | ||||
-rw-r--r-- | contrib/hostapd/config.c | 3 | ||||
-rw-r--r-- | contrib/hostapd/ctrl_iface.c | 4 | ||||
-rw-r--r-- | contrib/hostapd/eapol_sm.h | 2 | ||||
-rw-r--r-- | contrib/hostapd/ms_funcs.c | 4 | ||||
-rw-r--r-- | contrib/hostapd/radius_client.c | 2 | ||||
-rw-r--r-- | contrib/hostapd/radius_server.c | 12 | ||||
-rw-r--r-- | contrib/hostapd/tls_openssl.c | 9 | ||||
-rw-r--r-- | contrib/hostapd/version.h | 2 |
11 files changed, 49 insertions, 9 deletions
diff --git a/contrib/hostapd/ChangeLog b/contrib/hostapd/ChangeLog index e4b73ec..9d15f75 100644 --- a/contrib/hostapd/ChangeLog +++ b/contrib/hostapd/ChangeLog @@ -1,5 +1,19 @@ ChangeLog for hostapd +2005-06-10 - v0.3.9 + * fixed a bug which caused some RSN pre-authentication cases to use + freed memory and potentially crash hostapd + * fixed private key loading for cases where passphrase is not set + * fixed WPA2 to add PMKSA cache entry when using integrated EAP + authenticator + * driver_madwifi: fixed pairwise key removal to allow WPA reauth + without disassociation + * fixed RADIUS attribute Class processing to only use Access-Accept + packets to update Class; previously, other RADIUS authentication + packets could have cleared Class attribute + * fixed PMKSA caching (EAP authentication was not skipped correctly + with the new state machine changes from IEEE 802.1X draft) + 2005-02-12 - v0.3.7 (beginning of 0.3.x stable releases) 2005-01-23 - v0.3.5 diff --git a/contrib/hostapd/Makefile b/contrib/hostapd/Makefile index 4c9c49e..0ea99c9 100644 --- a/contrib/hostapd/Makefile +++ b/contrib/hostapd/Makefile @@ -228,6 +228,6 @@ hostapd_cli: hostapd_cli.o hostapd_ctrl.o $(CC) -o hostapd_cli hostapd_cli.o hostapd_ctrl.o clean: - rm -f core *~ *.o hostapd *.d driver_conf.c + rm -f core *~ *.o hostapd hostapd_cli *.d driver_conf.c -include $(OBJS:%.o=%.d) diff --git a/contrib/hostapd/common.h b/contrib/hostapd/common.h index aa6429c..0f154e9 100644 --- a/contrib/hostapd/common.h +++ b/contrib/hostapd/common.h @@ -8,8 +8,12 @@ #ifdef __FreeBSD__ #include <sys/types.h> #include <sys/endian.h> +#define __BYTE_ORDER _BYTE_ORDER +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#define __BIG_ENDIAN _BIG_ENDIAN #define bswap_16 bswap16 #define bswap_32 bswap32 +#define bswap_64 bswap64 #endif #ifdef CONFIG_NATIVE_WINDOWS diff --git a/contrib/hostapd/config.c b/contrib/hostapd/config.c index ede009a..02ecd79 100644 --- a/contrib/hostapd/config.c +++ b/contrib/hostapd/config.c @@ -597,7 +597,8 @@ static int hostapd_config_check(struct hostapd_config *conf) } if (conf->wpa && (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) && - conf->wpa_psk == NULL && conf->wpa_passphrase == NULL) { + conf->wpa_psk == NULL && conf->wpa_passphrase == NULL && + conf->wpa_psk_file == NULL) { printf("WPA-PSK enabled, but PSK or passphrase is not " "configured.\n"); return -1; diff --git a/contrib/hostapd/ctrl_iface.c b/contrib/hostapd/ctrl_iface.c index 8cf356c..9ed109b 100644 --- a/contrib/hostapd/ctrl_iface.c +++ b/contrib/hostapd/ctrl_iface.c @@ -20,6 +20,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> +#include <sys/uio.h> #include <sys/stat.h> #include <errno.h> #include <netinet/in.h> @@ -383,7 +384,8 @@ void hostapd_ctrl_iface_deinit(struct hostapd_data *hapd) unlink(fname); free(fname); - if (rmdir(hapd->conf->ctrl_interface) < 0) { + if (hapd->conf->ctrl_interface && + rmdir(hapd->conf->ctrl_interface) < 0) { if (errno == ENOTEMPTY) { wpa_printf(MSG_DEBUG, "Control interface " "directory not empty - leaving it " diff --git a/contrib/hostapd/eapol_sm.h b/contrib/hostapd/eapol_sm.h index 7b74ed1..c89dd02 100644 --- a/contrib/hostapd/eapol_sm.h +++ b/contrib/hostapd/eapol_sm.h @@ -195,6 +195,8 @@ struct eapol_state_machine { */ u8 currentId; + Boolean initializing; /* in process of initializing state machines */ + /* Somewhat nasty pointers to global hostapd and STA data to avoid * passing these to every function */ struct hostapd_data *hapd; diff --git a/contrib/hostapd/ms_funcs.c b/contrib/hostapd/ms_funcs.c index 9c50185..590b589 100644 --- a/contrib/hostapd/ms_funcs.c +++ b/contrib/hostapd/ms_funcs.c @@ -158,12 +158,14 @@ void get_master_key(const u8 *password_hash_hash, const u8 *nt_response, }; const unsigned char *addr[3]; const size_t len[3] = { 16, 24, sizeof(magic1) }; + u8 hash[SHA1_MAC_LEN]; addr[0] = password_hash_hash; addr[1] = nt_response; addr[2] = magic1; - sha1_vector(3, addr, len, master_key); + sha1_vector(3, addr, len, hash); + memcpy(master_key, hash, 16); } diff --git a/contrib/hostapd/radius_client.c b/contrib/hostapd/radius_client.c index e173775..dc69ca9 100644 --- a/contrib/hostapd/radius_client.c +++ b/contrib/hostapd/radius_client.c @@ -506,7 +506,7 @@ static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx) rconf = hapd->conf->auth_server; } - len = recv(sock, buf, sizeof(buf), 0); + len = recv(sock, buf, sizeof(buf), MSG_DONTWAIT); if (len < 0) { perror("recv[RADIUS]"); return; diff --git a/contrib/hostapd/radius_server.c b/contrib/hostapd/radius_server.c index bfc784f..d62648f 100644 --- a/contrib/hostapd/radius_server.c +++ b/contrib/hostapd/radius_server.c @@ -325,6 +325,7 @@ static int radius_server_reject(struct radius_server_data *data, { struct radius_msg *msg; int ret = 0; + struct eap_hdr eapfail; RADIUS_DEBUG("Reject invalid request from %s:%d", inet_ntoa(from->sin_addr), ntohs(from->sin_port)); @@ -335,6 +336,16 @@ static int radius_server_reject(struct radius_server_data *data, return -1; } + memset(&eapfail, 0, sizeof(eapfail)); + eapfail.code = EAP_CODE_FAILURE; + eapfail.identifier = 0; + eapfail.length = htons(sizeof(eapfail)); + + if (!radius_msg_add_eap(msg, (u8 *) &eapfail, sizeof(eapfail))) { + RADIUS_DEBUG("Failed to add EAP-Message attribute"); + } + + if (radius_msg_finish_srv(msg, (u8 *) client->shared_secret, client->shared_secret_len, request->hdr->authenticator) < 0) { @@ -395,6 +406,7 @@ static int radius_server_request(struct radius_server_data *data, sess = radius_server_get_new_session(data, client, msg); if (sess == NULL) { RADIUS_DEBUG("Could not create a new session"); + radius_server_reject(data, client, msg, from); return -1; } } diff --git a/contrib/hostapd/tls_openssl.c b/contrib/hostapd/tls_openssl.c index 097b1c8..4e6ea53 100644 --- a/contrib/hostapd/tls_openssl.c +++ b/contrib/hostapd/tls_openssl.c @@ -489,9 +489,12 @@ int tls_global_private_key(void *_ssl_ctx, const char *private_key, if (private_key == NULL) return 0; - passwd = strdup(private_key_passwd); - if (passwd == NULL) - return -1; + if (private_key_passwd) { + passwd = strdup(private_key_passwd); + if (passwd == NULL) + return -1; + } else + passwd = NULL; SSL_CTX_set_default_passwd_cb(ssl_ctx, tls_passwd_cb); SSL_CTX_set_default_passwd_cb_userdata(ssl_ctx, passwd); diff --git a/contrib/hostapd/version.h b/contrib/hostapd/version.h index 074fd52..b030f34 100644 --- a/contrib/hostapd/version.h +++ b/contrib/hostapd/version.h @@ -1,6 +1,6 @@ #ifndef VERSION_H #define VERSION_H -#define VERSION_STR "0.3.7" +#define VERSION_STR "0.3.9" #endif /* VERSION_H */ |