resource-agents/SOURCES/bz1751700-IPaddr2-2-return-empty-when-sanitation-fails.patch
2021-09-10 03:52:59 +00:00

23 lines
869 B
Diff

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