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

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