summaryrefslogtreecommitdiff
path: root/vif-route.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-12 04:00:49 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-12 04:00:49 +0000
commitc22f60e6e55f1bf300dd76d2222a93911f3b2bb2 (patch)
treeef665e7018377f53612ac2751dcaea35a1c587b6 /vif-route.patch
parent39a4763249cd6289e5019acfe0c98dbb169f5f2e (diff)
automatic import of xenopeneuler22.03_LTS
Diffstat (limited to 'vif-route.patch')
-rw-r--r--vif-route.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/vif-route.patch b/vif-route.patch
new file mode 100644
index 0000000..28fda9d
--- /dev/null
+++ b/vif-route.patch
@@ -0,0 +1,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
+