[PATCH] driver_devicescape: fix init error handling

Johannes Berg johannes at sipsolutions.net
Tue Nov 27 16:07:07 EST 2007


When setting the interface to master mode fails we don't return an error
as we should. Fix that.

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

--- hostap.orig/hostapd/driver_devicescape.c	2007-11-27 22:05:57.000000000 +0100
+++ hostap/hostapd/driver_devicescape.c	2007-11-27 22:06:17.000000000 +0100
@@ -1567,6 +1567,7 @@ static int i802_init_sockets(struct i802
 
 	if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) {
 		perror("ioctl[SIOCSIWMODE]");
+		return -1;
 	}
 
 	if (hostapd_set_iface_flags(drv, drv->iface, 1))





More information about the HostAP mailing list