hostapd: fix line reordering leading to segfaults
authorFelix Fietkau <nbd@openwrt.org>
Sun, 2 May 2010 23:38:15 +0000 (23:38 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 2 May 2010 23:38:15 +0000 (23:38 +0000)
SVN-Revision: 21323

package/hostapd/patches/390-nl80211_fixes.patch

index 2413a1266a7f7c1b70c1fc7e71106716b2e4e6b3..fdac284b6413aabd7878be2b3708c673fd4bc47f 100644 (file)
  #endif /* HOSTAPD */
  
        if (addr && iftype != NL80211_IFTYPE_MONITOR &&
-@@ -4765,6 +4761,7 @@ static void *i802_init(struct hostapd_da
-       if (bss == NULL)
+@@ -4766,6 +4762,7 @@ static void *i802_init(struct hostapd_da
                return NULL;
  
-+      drv->nlmode = NL80211_IFTYPE_AP;
        drv = bss->drv;
++      drv->nlmode = NL80211_IFTYPE_AP;
        if (linux_br_get(brname, params->ifname) == 0) {
                wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in bridge %s",
+                          params->ifname, brname);