* [PATCH] tools: fix vif-route add|remove
@ 2016-09-07 15:52 Charles Arnold
2016-09-20 13:57 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Charles Arnold @ 2016-09-07 15:52 UTC (permalink / raw)
To: xen-devel
From 2b4e942ad75f4a4546c417d8bd1116e3af368daf Mon Sep 17 00:00:00 2001
From: Charles Arnold <carnold@suse.com>
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.
Signed-off-by: Charles Arnold <carnold@suse.com>
---
tools/hotplug/Linux/vif-route | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hotplug/Linux/vif-route b/tools/hotplug/Linux/vif-route
index c149ffc..d49eb20 100644
--- a/tools/hotplug/Linux/vif-route
+++ b/tools/hotplug/Linux/vif-route
@@ -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
--
1.8.5.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools: fix vif-route add|remove
2016-09-07 15:52 [PATCH] tools: fix vif-route add|remove Charles Arnold
@ 2016-09-20 13:57 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2016-09-20 13:57 UTC (permalink / raw)
To: Charles Arnold; +Cc: Ian Jackson, Wei Liu, xen-devel
On Wed, Sep 07, 2016 at 09:52:31AM -0600, Charles Arnold wrote:
> From 2b4e942ad75f4a4546c417d8bd1116e3af368daf Mon Sep 17 00:00:00 2001
> From: Charles Arnold <carnold@suse.com>
> 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.
>
> Signed-off-by: Charles Arnold <carnold@suse.com>
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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-20 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 15:52 [PATCH] tools: fix vif-route add|remove Charles Arnold
2016-09-20 13:57 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).