xen/vif-route.patch
Charles Arnold f9b3d85b1e - Update to Xen 4.20.0 RC2 release
* xen/arm: Fully initialise struct membanks_hdr fields
  * build: Set DATE to SOURCE_DATE_EPOCH if available (for 
    reproducible builds)
  * x86: Add Support for Paging-Write Feature
  * x86/time: introduce command line option to select wallclock
  * x86/time: prefer CMOS over EFI_GET_TIME
  * xentrace: free CPU mask string before overwriting pointer
  * xl: properly dispose of vTPM struct instance
  * xl: properly dispose of libxl_dominfo struct instances
  * Various documentation fixes and adjustments
  * Various MISRA compliance improvements.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=871
2025-01-20 13:29:19 +00:00

26 lines
856 B
Diff

References: bsc#985503
Index: xen-4.15.1-testing/tools/hotplug/Linux/vif-route
===================================================================
--- xen-4.15.1-testing.orig/tools/hotplug/Linux/vif-route
+++ xen-4.15.1-testing/tools/hotplug/Linux/vif-route
@@ -57,11 +57,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