bridge: Use safe default bridge interface
Currently by default, all BSS share the bridge brvlan%d. While this is sane when no tagged-interface is given, this is insane when different tagged interfaces are given, as it would result in bridging those tagged interfaces. This patch therefore uses br%s%d with %s=tagged_interface and %d=VLAN ID as bridge name when a tagged-interface is given. Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
2aaeedfa07
commit
459eee923c
2 changed files with 11 additions and 1 deletions
|
@ -497,6 +497,10 @@ static void vlan_newlink(char *ifname, struct hostapd_data *hapd)
|
|||
os_snprintf(br_name, sizeof(br_name), "%s%d",
|
||||
hapd->conf->vlan_bridge,
|
||||
vlan->vlan_id);
|
||||
} else if (tagged_interface) {
|
||||
os_snprintf(br_name, sizeof(br_name),
|
||||
"br%s.%d", tagged_interface,
|
||||
vlan->vlan_id);
|
||||
} else {
|
||||
os_snprintf(br_name, sizeof(br_name),
|
||||
"brvlan%d", vlan->vlan_id);
|
||||
|
@ -560,6 +564,10 @@ static void vlan_dellink(char *ifname, struct hostapd_data *hapd)
|
|||
os_snprintf(br_name, sizeof(br_name), "%s%d",
|
||||
hapd->conf->vlan_bridge,
|
||||
vlan->vlan_id);
|
||||
} else if (tagged_interface) {
|
||||
os_snprintf(br_name, sizeof(br_name),
|
||||
"br%s.%d", tagged_interface,
|
||||
vlan->vlan_id);
|
||||
} else {
|
||||
os_snprintf(br_name, sizeof(br_name),
|
||||
"brvlan%d", vlan->vlan_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue