This commit was generated by cvs2svn to compensate for changes in r147341,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
sam 2005-06-13 17:00:32 +00:00
commit ef42ed26e0
11 changed files with 49 additions and 9 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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 "

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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 */