From f99eb24f4e6d129be75625b72ff34eb8c80df823 Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Thu, 8 Feb 2024 13:13:41 +0100 Subject: [PATCH] - findif.sh: fix loopback IP handling Resolves: RHEL-15305 --- ...05-1-findif.sh-fix-loopback-handling.patch | 0 ...2-findif.sh-dont-use-table-parameter.patch | 20 +++++++++++++++++++ resource-agents.spec | 13 ++++++++---- 3 files changed, 29 insertions(+), 4 deletions(-) rename RHEL-15305-findif.sh-fix-loopback-handling.patch => RHEL-15305-1-findif.sh-fix-loopback-handling.patch (100%) create mode 100644 RHEL-15305-2-findif.sh-dont-use-table-parameter.patch diff --git a/RHEL-15305-findif.sh-fix-loopback-handling.patch b/RHEL-15305-1-findif.sh-fix-loopback-handling.patch similarity index 100% rename from RHEL-15305-findif.sh-fix-loopback-handling.patch rename to RHEL-15305-1-findif.sh-fix-loopback-handling.patch diff --git a/RHEL-15305-2-findif.sh-dont-use-table-parameter.patch b/RHEL-15305-2-findif.sh-dont-use-table-parameter.patch new file mode 100644 index 0000000..29dba3b --- /dev/null +++ b/RHEL-15305-2-findif.sh-dont-use-table-parameter.patch @@ -0,0 +1,20 @@ +--- a/heartbeat/findif.sh 2024-02-08 11:31:53.414257686 +0100 ++++ b/heartbeat/findif.sh 2023-11-02 10:20:12.150853167 +0100 +@@ -210,14 +210,14 @@ + fi + findif_check_params $family || return $? + +- if [ -n "$netmask" ] ; then ++ if [ -n "$netmask" ]; then + match=$match/$netmask + fi + if [ -n "$nic" ] ; then + # NIC supports more than two. +- set -- $(ip -o -f $family route list match $match $scope table "${OCF_RESKEY_table:=main}" | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}') ++ set -- $(ip -o -f $family route list match $match $scope | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}') + else +- set -- $(ip -o -f $family route list match $match $scope table "${OCF_RESKEY_table:=main}" | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}') ++ set -- $(ip -o -f $family route list match $match $scope | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}') + fi + if [ $# = 0 ] ; then + case $OCF_RESKEY_ip in diff --git a/resource-agents.spec b/resource-agents.spec index 96aa8d9..cdbf08e 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -73,7 +73,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.9.0 -Release: 53%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 54%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -156,9 +156,10 @@ Patch59: bz2189243-Filesystem-3-fix-signal_delay-default-value.patch Patch60: bz1904465-mysql-common-improve-error-message.patch Patch61: RHEL-15302-1-exportfs-make-fsid-optional.patch Patch62: RHEL-15302-2-ocft-exportfs-remove-fsid-required-test.patch -Patch63: RHEL-15305-findif.sh-fix-loopback-handling.patch +Patch63: RHEL-15305-1-findif.sh-fix-loopback-handling.patch Patch64: RHEL-16248-aws-vpc-move-ip-aws-vpc-route53-awseip-awsvip-auth_type-role.patch Patch65: RHEL-17083-findif-EOS-fix.patch +Patch66: RHEL-15305-2-findif.sh-dont-use-table-parameter.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -406,6 +407,7 @@ exit 1 %patch -p1 -P 63 %patch -p1 -P 64 %patch -p1 -P 65 +%patch -p1 -P 66 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -987,6 +989,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Thu Feb 8 2024 Oyvind Albrigtsen - 4.9.0-54 +- findif.sh: fix loopback IP handling + + Resolves: RHEL-15305 + * Wed Jan 24 2024 Oyvind Albrigtsen - 4.9.0-53 - bundled urllib3: fix CVE-2023-45803 - bundled pycryptodome: fix CVE-2023-52323 @@ -1006,10 +1013,8 @@ ccs_update_schema > /dev/null 2>&1 ||: * Thu Nov 2 2023 Oyvind Albrigtsen - 4.9.0-49 - exportfs: make "fsid" parameter optional -- findif.sh: fix loopback IP handling Resolves: RHEL-15302 - Resolves: RHEL-15305 * Wed Sep 6 2023 Oyvind Albrigtsen - 4.9.0-48 - mysql-common: improve error message