2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00

mirroring: Preserve key for disabling learning.

Don't delete the key for disabling MAC learning on a given VLAN
after a reboot.  Also logs when learning is disabled.
This commit is contained in:
Jesse Gross
2009-11-11 14:48:48 -08:00
parent e96a4d8035
commit 42061b2a5b
4 changed files with 10 additions and 4 deletions

View File

@@ -3361,6 +3361,8 @@ mirror_reconfigure(struct bridge *br)
int vlan = cfg_get_vlan(i, "vlan.%s.disable-learning", br->name);
if (vlan >= 0) {
bitmap_set1(rspan_vlans, vlan);
VLOG_INFO("bridge %s: disabling learning on vlan %d\n",
br->name, vlan);
} else {
VLOG_ERR("bridge %s: invalid value '%s' for learning disabled "
"VLAN", br->name,

View File

@@ -275,7 +275,8 @@ function start {
'--del-match=port.*' \
'--del-match=bonding.*' \
'--del-match=iface.*' \
'--del-match=vlan.*'
'--del-match=vlan.*.trunks=*' \
'--del-match=vlan.*.tag=*'
fi
start_vswitchd

View File

@@ -92,7 +92,8 @@ add_to_bridge()
$cfg_mod -F /etc/ovs-vswitchd.conf \
--del-match="bridge.*.port=$vif" \
--del-match="vlan.$vif.[!0-9]*" \
--del-match="vlan.$vif.trunks=*" \
--del-match="vlan.$vif.tag=*" \
--del-match="port.$vif.[!0-9]*" \
--add="bridge.$bridge.port=$vif" \
$vid $vif_details -c
@@ -128,7 +129,8 @@ remove)
logger -t scripts-vif "${vif} has been removed"
$cfg_mod -vANY:console:emer -F /etc/ovs-vswitchd.conf \
--del-match="bridge.*.port=${vif}" \
--del-match="vlan.${vif}.[!0-9]*" \
--del-match="vlan.${vif}.trunks=*" \
--del-match="vlan.${vif}.tag=*" \
--del-match="port.${vif}.[!0-9]*" -c
$service vswitch reload
;;

View File

@@ -1250,7 +1250,8 @@ def datapath_deconfigure_ipdev(interface):
return ['--del-match=bridge.*.port=%s' % interface,
'--del-match=port.%s.[!0-9]*' % interface,
'--del-match=iface.%s.[!0-9]*' % interface,
'--del-match=vlan.%s.[!0-9]*' % interface]
'--del-match=vlan.%s.trunks=*' % interface,
'--del-match=vlan.%s.tag=*' % interface]
def datapath_modify_config(commands):
if debug_mode():