X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=xenserver%2Fetc_xensource_scripts_vif;fp=xenserver%2Fetc_xensource_scripts_vif;h=cede29c4d9f3fd9bf2ff007f303c289a0d814eb2;hb=dac3c52f893f7df16f935ef4875c5467abd4ea23;hp=fdfc3205df717b067df65378e14ad361e71e216a;hpb=c07686a4b073aa2092a0653a3fa92bb78688e090;p=sliver-openvswitch.git diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif index fdfc3205d..cede29c4d 100755 --- a/xenserver/etc_xensource_scripts_vif +++ b/xenserver/etc_xensource_scripts_vif @@ -1,7 +1,17 @@ #!/bin/sh -# Copyright (C) 2008,2009 Citrix Systems, Inc. All rights reserved. +# Copyright (C) 2008,2009 Citrix Systems, Inc. # Copyright (C) 2009 Nicira Networks, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; version 2.1 only. with the special +# exception on linking described in file LICENSE. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. # CA-23900: Warning: when VIFs are added to windows guests with PV drivers the backend vif device is registered, # unregistered and then registered again. This causes the udev event to fire twice and this script runs twice. @@ -117,7 +127,7 @@ add_to_bridge() local vid= if [ "$VLAN_ID" -ne 0 ] ; then bridge=$($vsctl br-to-parent $bridge) - vid="--add=vlan.${dev}.tag=${VLAN_ID}" + vid="--add=vlan.${vif}.tag=${VLAN_ID}" fi if [ "$type" = "vif" ] ; then @@ -132,7 +142,8 @@ add_to_bridge() $cfg_mod -F /etc/ovs-vswitchd.conf \ --del-match="bridge.*.port=${dev}" \ - --del-match="vlan.${dev}.[!0-9]*" \ + --del-match="vlan.${dev}.trunks=*" \ + --del-match="vlan.${dev}.tags=*" \ --del-match="port.${dev}.[!0-9]*" \ --add="bridge.$bridge.port=${dev}" \ $vid $vif_details -c @@ -200,7 +211,8 @@ remove) logger -t scripts-vif "${dev} has been removed" $cfg_mod -vANY:console:emer -F /etc/ovs-vswitchd.conf \ --del-match="bridge.*.port=${dev}" \ - --del-match="vlan.${dev}.[!0-9]*" \ + --del-match="vlan.${dev}.trunks=*" \ + --del-match="vlan.${dev}.tag=*" \ --del-match="port.${dev}.[!0-9]*" -c $service vswitch reload ;;