From 20ca113d9a6f87a04b3dc75f42d82b6118c719ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 4 Oct 2006 21:38:32 +0000 Subject: [PATCH] always reset the wds list in wificonf (#808) SVN-Revision: 4919 --- openwrt/package/wificonf/wificonf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.30.2