blob: 28fda9d48630f3a57f3ec7a40ddd07221153f167 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
References: bsc#985503
Index: xen-4.13.0-testing/tools/hotplug/Linux/vif-route
===================================================================
--- xen-4.13.0-testing.orig/tools/hotplug/Linux/vif-route
+++ xen-4.13.0-testing/tools/hotplug/Linux/vif-route
@@ -61,11 +61,13 @@ case "${type_if}" in
;;
esac
-# 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
- ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} metric ${metric}
-done
+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
+ ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} metric ${metric}
+ done
+fi
handle_iptable
|