From: Felix Fietkau Date: Wed, 4 Oct 2006 21:38:32 +0000 (+0000) Subject: always reset the wds list in wificonf (#808) X-Git-Tag: whiterussian_rc6~117 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=20ca113d9a6f87a04b3dc75f42d82b6118c719ae;p=openwrt%2Fsvn-archive%2Fopenwrt.git always reset the wds list in wificonf (#808) SVN-Revision: 4919 --- diff --git a/openwrt/package/wificonf/wificonf.c b/openwrt/package/wificonf/wificonf.c index 401e9049fd..d045ad71f7 100644 --- a/openwrt/package/wificonf/wificonf.c +++ b/openwrt/package/wificonf/wificonf.c @@ -200,12 +200,12 @@ static int setup_bcom_wds(int skfd, char *ifname) char *v; int wds_enabled = 0; + memset(buf, 0, 8192); if (v = nvram_get(wl_var("wds"))) { struct maclist *wdslist = (struct maclist *) buf; struct ether_addr *addr = wdslist->ea; char *next; - memset(buf, 0, 8192); foreach(wbuf, v, next) { if (ether_atoe(wbuf, addr->ether_addr_octet)) { wdslist->count++; @@ -213,8 +213,9 @@ static int setup_bcom_wds(int skfd, char *ifname) wds_enabled = 1; } } - bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf)); } + bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf)); + return wds_enabled; }