Blame SOURCES/bz1751700-IPaddr2-2-return-empty-when-sanitation-fails.patch

734564
From 7eff4e17641cc1463e61d772af16d17264477523 Mon Sep 17 00:00:00 2001
734564
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
734564
Date: Thu, 12 Sep 2019 12:51:54 +0200
734564
Subject: [PATCH] IPaddr2: IPv6 return empty string when sanitation fails
734564
734564
---
734564
 heartbeat/IPaddr2 | 2 +-
734564
 1 file changed, 1 insertion(+), 1 deletion(-)
734564
734564
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
734564
index 4f28ddab6..1d39ae514 100755
734564
--- a/heartbeat/IPaddr2
734564
+++ b/heartbeat/IPaddr2
734564
@@ -478,7 +478,7 @@ ip_init() {
734564
 	else
734564
 		FAMILY=inet6
734564
 		# address sanitization defined in RFC5952
734564
-		SANITIZED_IP=$($IP2UTIL route get $OCF_RESKEY_ip | awk '$1~/:/ {print $1}  $2~/:/ {print $2}')
734564
+		SANITIZED_IP=$($IP2UTIL route get $OCF_RESKEY_ip 2> /dev/null | awk '$1~/:/ {print $1}  $2~/:/ {print $2}')
734564
                 if [ -n "$SANITIZED_IP" ]; then
734564
                     OCF_RESKEY_ip="$SANITIZED_IP"
734564
                 fi