From cf27ca4719c66def0dd2b0be3ff70234bdd83940 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 23 2023 14:33:30 +0000 Subject: import hyperv-daemons-0-0.40.20190303git.el9_1.1 --- diff --git a/SOURCES/hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch b/SOURCES/hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch new file mode 100644 index 0000000..ddc4bc0 --- /dev/null +++ b/SOURCES/hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch @@ -0,0 +1,46 @@ +From 9d17efdf9fa4f3303f6777fe279b4db2288297f3 Mon Sep 17 00:00:00 2001 +From: Mohammed Gamal +Date: Tue, 8 Nov 2022 16:20:17 +0100 +Subject: [PATCH] redhat: hv_set_if_config: Workaround for gateway numbering in + NetworkManager + +RH-Author: Mohamed Gamal Morsy +RH-MergeRequest: 12: redhat: hv_set_if_config: Workaround for gateway numbering in NetworkManager +RH-Bugzilla: 2150268 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Emanuele Giuseppe Esposito +RH-Commit: [1/1] 921b1c70f5d802f0b388fd81817151313871cb91 + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2150268 + +Unlike older sysconfig scripts, NetworkManager expects GATEWAYx=ipaddr for all values of x. +So the first gateway is GATEWAY0 instead of GATEWAY. Other values should remain unchanged. +Workaround this by replacing GATEWAY= with GATEWAY0=. + +A proper fix however, would be to generate NetworkManager keyfiles instead of ifcfg files. +That can be done eitter by changing hypervkvpd code to do that or to let the script parse +ifcfg files and generate corresponding NetworkManager keyfiles + +Signed-off-by: Mohammed Gamal +--- + hv_set_ifconfig.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/hv_set_ifconfig.sh b/hv_set_ifconfig.sh +index 146829b..fe7fccf 100644 +--- a/hv_set_ifconfig.sh ++++ b/hv_set_ifconfig.sh +@@ -54,6 +54,10 @@ echo "IPV6INIT=yes" >> $1 + echo "PEERDNS=yes" >> $1 + echo "ONBOOT=yes" >> $1 + ++#Unlike older sysconfig scripts, NetworkManager expects GATEWAYx=ipaddr for all values of x. ++#So the first gateway is GATEWAY0 instead of GATEWAY. Other values should remain unchanged. ++#Workaround this by replacing GATEWAY= with GATEWAY0=. ++sed -i "s/GATEWAY=/GATEWAY0=/" $1 + + cp $1 /etc/sysconfig/network-scripts/ + +-- +2.31.1 + diff --git a/SPECS/hyperv-daemons.spec b/SPECS/hyperv-daemons.spec index 928780c..56298f2 100644 --- a/SPECS/hyperv-daemons.spec +++ b/SPECS/hyperv-daemons.spec @@ -13,7 +13,7 @@ Name: hyperv-daemons Version: 0 -Release: 0.40%{?snapver}%{?dist} +Release: 0.40%{?snapver}%{?dist}.1 Summary: Hyper-V daemons suite License: GPLv2 @@ -52,6 +52,8 @@ Patch0006: 0006-tools-hv-change-http-to-https-in-hv_kvp_daemon.c.patch Patch7: hpvd-hv_set_ifconfig.sh-Use-nmcli-commands.patch # For bz#2026371 - [RHEL9][Hyper-V]The /usr/libexec/hypervkvpd/hv_set_ifconfig need update for RHEL9 since the ifdown/ifup was not supported on RHEL9 Patch8: hpvd-Use-filename-for-connection-profile.patch +# For bz#2150268 - [Hyper-V][RHEL-9] Cannot set gateway properly when set static IPADDR0,NETMASK0,GATEWAY in ifcfg-eth0 [rhel-9.1.0.z] +Patch9: hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch # Source-git patches @@ -159,6 +161,7 @@ cp -pvL %{SOURCE301} lsvmbus %patch0006 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build # HYPERV KVP DAEMON @@ -276,6 +279,11 @@ fi %{_sbindir}/vmbus_testing %changelog +* Tue Dec 06 2022 Miroslav Rezanina - 0-0.40.20190303git.el9_1.1 +- hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch [bz#2150268] +- Resolves: bz#2150268 + ([Hyper-V][RHEL-9] Cannot set gateway properly when set static IPADDR0,NETMASK0,GATEWAY in ifcfg-eth0 [rhel-9.1.0.z]) + * Fri Jul 29 2022 Miroslav Rezanina - 0-0.40.20190303git - hpvd-hypervkvpd.service-ordering-fixes.patch [bz#2103188] - Resolves: bz#2103188