Blame SOURCES/bz1940097-awsvip-dont-partially-match-IPs.patch

435ead
From 3491a6ad30830a8545defa5a417a7db46b093904 Mon Sep 17 00:00:00 2001
435ead
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
435ead
Date: Wed, 17 Mar 2021 12:39:10 +0100
435ead
Subject: [PATCH] awsvip: dont partially match similar IPs during
435ead
 monitor-action
435ead
435ead
---
435ead
 heartbeat/awsvip | 2 +-
435ead
 1 file changed, 1 insertion(+), 1 deletion(-)
435ead
435ead
diff --git a/heartbeat/awsvip b/heartbeat/awsvip
435ead
index 7d0bf35b6..044d049c6 100755
435ead
--- a/heartbeat/awsvip
435ead
+++ b/heartbeat/awsvip
435ead
@@ -172,7 +172,7 @@ awsvip_monitor() {
435ead
             --instance-id "${INSTANCE_ID}" \
435ead
             --query 'Reservations[].Instances[].NetworkInterfaces[].PrivateIpAddresses[].PrivateIpAddress[]' \
435ead
             --output text | \
435ead
-            grep -q "${SECONDARY_PRIVATE_IP}"
435ead
+            grep -qE "(^|\s)${SECONDARY_PRIVATE_IP}(\s|$)"
435ead
     RET=$?
435ead
 
435ead
     if [ $RET -ne 0 ]; then