Fix XVM's classic networking problem 0.0.56
authorMitchell E Berger <mitchb@mit.edu>
Tue, 26 Jun 2018 02:04:34 +0000 (22:04 -0400)
committerMitchell E Berger <mitchb@mit.edu>
Tue, 26 Jun 2018 02:04:34 +0000 (22:04 -0400)
vif-invirtroute: Kill arpspoof with SIGKILL when we're done.  The
version in this distro (which is the latest beta from the
unmaintained upstream) tries to "clean up" when you normally
terminate it.  This involves trying to perform an ARP lookup
without interfering to see what the MAC should've been and then
sending replies for that.  This appears to cause a race depending
on whether the entry for the machine's old domain (if it's being
rebooted) is listed as <incomplete> in the ARP table or is totally
flushed.  If you lose the race, it sends further gratuitous ARPs
telling the router that your MAC is all-zeros because of a bug
where it fails to check for an incomplete ARP entry.  This is
believed to cause the bug that has plagued XVM for years where
you sometimes lose off-network connectivity on reboot.

debian/changelog
vif-invirtroute

index 5efee71..40ff336 100644 (file)
@@ -1,3 +1,21 @@
+invirt-xen-config (0.0.56) unstable; urgency=low
+
+  * vif-invirtroute: Kill arpspoof with SIGKILL when we're done.  The
+    version in this distro (which is the latest beta from the
+    unmaintained upstream) tries to "clean up" when you normally
+    terminate it.  This involves trying to perform an ARP lookup
+    without interfering to see what the MAC should've been and then
+    sending replies for that.  This appears to cause a race depending
+    on whether the entry for the machine's old domain (if it's being
+    rebooted) is listed as <incomplete> in the ARP table or is totally
+    flushed.  If you lose the race, it sends further gratuitous ARPs
+    telling the router that your MAC is all-zeros because of a bug
+    where it fails to check for an incomplete ARP entry.  This is
+    believed to cause the bug that has plagued XVM for years where
+    you sometimes lose off-network connectivity on reboot.
+
+ -- Mitchell Berger <mitchb@mit.edu>  Mon, 25 Jun 2018 22:04:00 -0400
+
 invirt-xen-config (0.0.55) unstable; urgency=low
 
   * invirt-database: bump up autoinstall memory to make modern releases
index 69ca710..b3d9207 100755 (executable)
@@ -92,7 +92,7 @@ if [  ${vif_type} != "ioemu"  -o  x${qemu_online} = xyes ] ; then
            ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} ${src} $metric
            case "$command" in
                online|add)
-                   timeout 5 arpspoof -i $(invirt-getconf xen.iface) -t ${gateway} ${addr} || :
+                   timeout -s KILL 5 arpspoof -i $(invirt-getconf xen.iface) -t ${gateway} ${addr} || :
                    ;;
            esac
        done 
@@ -101,7 +101,7 @@ if [  ${vif_type} != "ioemu"  -o  x${qemu_online} = xyes ] ; then
            iptables -t nat ${ipt_action} PREROUTING -d ${other_ip} -j DNAT --to-destination ${addr}
            case "$command" in
                online|add)
-                   timeout 5 arpspoof -i $(invirt-getconf xen.iface) -t ${other_gateway} ${other_ip} || :
+                   timeout -s KILL 5 arpspoof -i $(invirt-getconf xen.iface) -t ${other_gateway} ${other_ip} || :
                    ;;
            esac
        fi