* vif-invirtroute: if there is an "other" IP address, DNAT it to the
primary IP, set up routing to get it to the VM, and arp for it.
Also, cut out the nonsense with backgrounding arpspoof, sleeping, and
- killing it; we have the technology for 'timeout'.
+ killing it; we have the technology for 'timeout'. Finally, don't
+ pass a "src" argument to "ip route del" to ensure a match even if
+ the host's "main IP" has changed and caused the route to be inserted
+ with a different src.
* templatize-xend-config: explicitly turn on the relocation server
- -- Mitchell Berger <mitchb@mit.edu> Thu, 17 May 2018 01:55:00 -0400
+ -- Mitchell Berger <mitchb@mit.edu> Fri, 25 May 2018 03:06:00 -0400
invirt-xen-config (0.0.53) unstable; urgency=low
# (with metric 1) should take precedence over the vif
# route and carry all the traffic.
+ src=""
if [ $ipcmd == "add" ]; then
+ src="src ${main_ip}"
case $dev in
vif*)
metric="metric 2"
;;
esac
fi
- ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} $metric
+ ${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} || :
esac
done
if [ -n "$other_ip" ]; then
- ${cmdprefix} ip route ${ipcmd} ${other_ip} dev ${dev} src ${main_ip} $metric
+ ${cmdprefix} ip route ${ipcmd} ${other_ip} dev ${dev} ${src} $metric
iptables -t nat ${ipt_action} PREROUTING -d ${other_ip} -j DNAT --to-destination ${addr}
case "$command" in
online|add)