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

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