a63e141
--- xen-4.11.0-rc7/tools/hotplug/Linux/colo-proxy-setup.orig	2018-06-28 08:39:45.000000000 +0100
a63e141
+++ xen-4.11.0-rc7/tools/hotplug/Linux/colo-proxy-setup	2018-07-03 20:09:26.637017216 +0100
a63e141
@@ -76,10 +76,10 @@
a63e141
 
a63e141
 function setup_secondary()
a63e141
 {
a63e141
-    do_without_error brctl delif $bridge $vifname
a63e141
-    do_without_error brctl addbr $forwardbr
a63e141
-    do_without_error brctl addif $forwardbr $vifname
a63e141
-    do_without_error brctl addif $forwardbr $forwarddev
a63e141
+    do_without_error ip link set $vifname nomaster
a63e141
+    do_without_error ip link add name $forwardbr type bridge
a63e141
+    do_without_error ip link set $vifname master $forwardbr
a63e141
+    do_without_error ip link set $forwarddev master $forwardbr
a63e141
     do_without_error ip link set dev $forwardbr up
a63e141
     do_without_error modprobe xt_SECCOLO
a63e141
 
a63e141
@@ -91,10 +91,10 @@
a63e141
 
a63e141
 function teardown_secondary()
a63e141
 {
a63e141
-    do_without_error brctl delif $forwardbr $forwarddev
a63e141
-    do_without_error brctl delif $forwardbr $vifname
a63e141
-    do_without_error brctl delbr $forwardbr
a63e141
-    do_without_error brctl addif $bridge $vifname
a63e141
+    do_without_error ip link set $forwarddev nomaster
a63e141
+    do_without_error ip link set $vifname nomaster
a63e141
+    do_without_error ip link delete $forwardbr type bridge
a63e141
+    do_without_error ip link set $vifname master $bridge
a63e141
 
a63e141
     do_without_error iptables -t mangle -D PREROUTING -m physdev --physdev-in \
a63e141
         $vifname -j SECCOLO --index $index
a63e141
--- xen-4.11.0-rc7/tools/hotplug/Linux/vif2.orig	2018-06-28 08:39:45.000000000 +0100
a63e141
+++ xen-4.11.0-rc7/tools/hotplug/Linux/vif2	2018-07-03 20:11:07.558757301 +0100
a63e141
@@ -7,13 +7,12 @@
a63e141
 bridge=$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")
a63e141
 if [ -z "$bridge" ]
a63e141
     then
a63e141
-    nr_bridges=$(($(brctl show | cut -f 1 | grep -v "^$" | wc -l) - 1))
a63e141
+    nr_bridges=$(bridge link | wc -l)
a63e141
     if [ "$nr_bridges" != 1 ]
a63e141
 	then
a63e141
 	fatal "no bridge specified, and don't know which one to use ($nr_bridges found)"
a63e141
     fi
a63e141
-    bridge=$(brctl show | cut -d "
a63e141
-" -f 2 | cut -f 1)
a63e141
+    bridge=$(bridge link | cut -d" " -f10)
a63e141
 fi
a63e141
 
a63e141
 command="$1"
a63e141
--- xen-4.11.0-rc7/tools/hotplug/Linux/vif-bridge.orig	2018-07-03 19:59:18.499474117 +0100
a63e141
+++ xen-4.11.0-rc7/tools/hotplug/Linux/vif-bridge	2018-07-03 20:12:31.088852864 +0100
a63e141
@@ -33,7 +33,7 @@
a63e141
 
a63e141
 if [ -z "$bridge" ]
a63e141
 then
a63e141
-  bridge=$(brctl show | awk 'NR==2{print$1}')
a63e141
+  bridge=$(bridge link | cut -d" " -f10)
a63e141
 
a63e141
   if [ -z "$bridge" ]
a63e141
   then
a63e141
@@ -82,7 +82,7 @@
a63e141
         ;;
a63e141
 
a63e141
     offline)
a63e141
-        do_without_error brctl delif "$bridge" "$dev"
a63e141
+        do_without_error ip link set "$dev" nomaster
a63e141
         do_without_error ifconfig "$dev" down
a63e141
         ;;
a63e141
 
a63e141
--- xen-4.11.0-rc7/tools/hotplug/Linux/xen-network-common.sh.orig	2018-07-03 19:59:18.500474154 +0100
a63e141
+++ xen-4.11.0-rc7/tools/hotplug/Linux/xen-network-common.sh	2018-07-03 20:16:16.466205182 +0100
a63e141
@@ -111,9 +111,7 @@
a63e141
 
a63e141
     # Don't create the bridge if it already exists.
a63e141
     if [ ! -e "/sys/class/net/${bridge}/bridge" ]; then
a63e141
-	brctl addbr ${bridge}
a63e141
-	brctl stp ${bridge} off
a63e141
-	brctl setfd ${bridge} 0
a63e141
+	ip link add name ${bridge} type bridge stp_state 0 forward_delay 0
a63e141
 	# Setting these to zero stops guest<->LAN traffic
a63e141
 	# traversing the bridge from hitting the *tables
a63e141
 	# rulesets. guest<->host traffic still gets processed
a63e141
@@ -134,7 +132,7 @@
a63e141
 	ip link set dev ${dev} up || true
a63e141
 	return
a63e141
     fi
a63e141
-    brctl addif ${bridge} ${dev}
a63e141
+    ip link set ${dev} master ${bridge}
a63e141
     ip link set dev ${dev} up
a63e141
 }
a63e141
 
a63e141
--- xen-4.11.0-rc7/tools/qemu-xen-traditional/i386-dm/qemu-ifup-Linux.orig	2017-09-15 19:37:27.000000000 +0100
a63e141
+++ xen-4.11.0-rc7/tools/qemu-xen-traditional/i386-dm/qemu-ifup-Linux	2018-07-03 20:17:52.934780235 +0100
a63e141
@@ -34,4 +34,4 @@
a63e141
 fi
a63e141
 
a63e141
 ifconfig $1 0.0.0.0 up
a63e141
-brctl addif $bridge $1 || true
a63e141
+ip link set $1 master $bridge || true