[PATCH] hostapd: handle invalid driver setting

Johannes Berg johannes at sipsolutions.net
Tue Nov 27 18:29:20 EST 2007


If the driver setting is invalid then the default is used rather than
creating an error. This changes that.

Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
---
 hostapd/config.c |    2 ++
 1 file changed, 2 insertions(+)

--- hostap.orig/hostapd/config.c	2007-11-28 00:27:27.000000000 +0100
+++ hostap/hostapd/config.c	2007-11-28 00:28:16.000000000 +0100
@@ -1305,6 +1305,8 @@ struct hostapd_config * hostapd_config_r
 			os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
 		} else if (strcmp(buf, "driver") == 0) {
 			int i;
+			/* clear to get error below if setting is invalid */
+			conf->driver = NULL;
 			for (i = 0; hostapd_drivers[i]; i++) {
 				if (os_strcmp(pos, hostapd_drivers[i]->name) ==
 				    0) {





More information about the HostAP mailing list