tools: fix vif-route add|remove
PATCH 1/1 tools: fix vif-route add|remove
From 2b4e942ad75f4a4546c417d8bd1116e3af368daf Mon Sep 17 00:00:00 2001
From: Charles Arnold <[email protected]>
Date: Wed, 7 Sep 2016 09:48:18 -0600
Subject: [PATCH] tools: fix vif-route add|remove
vif-route is called twice. First for the vif interface and second for the vif-emu interface. vif-route takes 4 parameters,
(add|remove|online|offline)
When called with 'online|offline' then 'ipcmd' is set. When called with 'add|remove' then 'ipcmd' is empty ('') and the command,
${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip}
will fail.
--- tools/hotplug/Linux/vif-route | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/Linux/vif-route +1 -1
@@ -35,7 +35,7 @@ case "${command}" in ;; esac -if [ "${ip}" ] ; then +if [ "${ip}" ] && [ "${ipcmd}" ] ; then # If we've been given a list of IP addresses, then add routes from dom0 to # the guest using those addresses. for addr in ${ip} ; do
Signature · 9 lines
1.8.5.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 10 lines · Charles Arnold
From
2b4e942ad75f4a4546c417d8bd1116e3af368dafMon Sep 17 00:00:00 2001
From: Charles Arnold <[email protected]>
Date: Wed, 7 Sep 2016 09:48:18 -0600
Subject: [PATCH] tools: fix vif-route add|removevif-route is called twice. First for the vif interface and second for the vif-emu interface. vif-route takes 4 parameters,
(add|remove|online|offline)
Quoted 8 lines
When called with 'online|offline' then 'ipcmd' is set. When called with 'add|remove' then 'ipcmd' is empty ('') and the command,
${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip}
will fail.
Signed-off-by Charles Arnold <[email protected]>
OK, there is indeed a bug.
But do we need to do anything about add / remove? I suppose the script works fine for you with this patch applied?
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel