From 85050752f9252497f2d66a44f3373475c3868adb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 18 May 2009 15:31:59 -0700 Subject: [PATCH] xenserver: Delete port ingress policing settings when adding vif. When we add a new vif, we should not retain any prior ingress policing settings from previous incarnations of a vif with the given name. Bug #1328. --- xenserver/etc_xensource_scripts_vif | 4 +++- xenserver/opt_xensource_libexec_interface-reconfigure | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif index 5195c0df..2c73768e 100755 --- a/xenserver/etc_xensource_scripts_vif +++ b/xenserver/etc_xensource_scripts_vif @@ -89,6 +89,7 @@ add_to_bridge() $cfg_mod -F /etc/ovs-vswitchd.conf \ --del-match="bridge.*.port=$vif" \ --del-match="vlan.$vif.[!0-9]*" \ + --del-match="port.$vif.[!0-9]*" \ --add="bridge.$bridge.port=$vif" \ $vid -c $service vswitch reload @@ -123,6 +124,7 @@ 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]*" -c + --del-match="vlan.${vif}.[!0-9]*" \ + --del-match="port.${vif}.[!0-9]*" -c ;; esac diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index 54f26748..7d196ac5 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -525,6 +525,7 @@ def interface_deconfigure_commands(interface): '--del-match=bonding.%s.[!0-9]*' % interface, '--del-match=bonding.*.slave=%s' % interface, '--del-match=vlan.%s.[!0-9]*' % interface, + '--del-match=port.%s.[!0-9]*' % interface, '--del-match=iface.%s.[!0-9]*' % interface] def run_command(command): -- 2.30.2