From: Jouni Malinen Date: Sat, 17 Apr 2010 06:45:18 +0000 (+0300) Subject: VLAN: Set statically configured VLAN interfaces up X-Git-Tag: hostap_0_7_2~15 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=libeap.git;a=commitdiff_plain;h=0249c988bb23afe0b3b0fab8c96d5104a2a15ec8 VLAN: Set statically configured VLAN interfaces up This is needed to be able to bind stations to them with mac80211. --- diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c index e197933..dcfb1ff 100644 --- a/src/ap/vlan_init.c +++ b/src/ap/vlan_init.c @@ -754,14 +754,17 @@ static int vlan_dynamic_add(struct hostapd_data *hapd, struct hostapd_vlan *vlan) { while (vlan) { - if (vlan->vlan_id != VLAN_ID_WILDCARD && - hapd->drv.vlan_if_add(hapd, vlan->ifname)) { - if (errno != EEXIST) { - wpa_printf(MSG_ERROR, "VLAN: Could not add " - "VLAN iface: %s: %s", - vlan->ifname, strerror(errno)); - return -1; + if (vlan->vlan_id != VLAN_ID_WILDCARD) { + if (hapd->drv.vlan_if_add(hapd, vlan->ifname)) { + if (errno != EEXIST) { + wpa_printf(MSG_ERROR, "VLAN: Could " + "not add VLAN %s: %s", + vlan->ifname, + strerror(errno)); + return -1; + } } + ifconfig_up(vlan->ifname); } vlan = vlan->next;