From adc23d07c56c0b5be6fd77382bc816b101dfe974 Mon Sep 17 00:00:00 2001 From: Mitchell E Berger Date: Mon, 25 Jun 2018 22:04:34 -0400 Subject: [PATCH] Fix XVM's classic networking problem 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 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 | 18 ++++++++++++++++++ vif-invirtroute | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5efee71..40ff336 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 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 diff --git a/vif-invirtroute b/vif-invirtroute index 69ca710..b3d9207 100755 --- a/vif-invirtroute +++ b/vif-invirtroute @@ -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 -- 1.7.9.5