[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hostap
Subject:    [PATCH] hostapd: handle invalid driver setting
From:       Johannes Berg <johannes () sipsolutions ! net>
Date:       2007-11-27 23:29:20
Message-ID: 1196206160.6058.110.camel () johannes ! berg
[Download RAW message or body]

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


_______________________________________________
HostAP mailing list
HostAP@shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic