Blame SOURCES/bz1582685-IPsrcaddr-4-fix-hardcoded-device.patch

011c77
From 5f0d15ad70098510a3782d6fd18d6eacfb51b0cf Mon Sep 17 00:00:00 2001
011c77
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
011c77
Date: Thu, 16 Jan 2020 14:59:26 +0100
011c77
Subject: [PATCH] IPsrcaddr: remove hardcoded device when using destination
011c77
 parameter
011c77
011c77
---
011c77
 heartbeat/IPsrcaddr | 2 +-
011c77
 1 file changed, 1 insertion(+), 1 deletion(-)
011c77
011c77
diff --git a/heartbeat/IPsrcaddr b/heartbeat/IPsrcaddr
011c77
index 0ef8b391f..7cdc3a9fe 100755
011c77
--- a/heartbeat/IPsrcaddr
011c77
+++ b/heartbeat/IPsrcaddr
011c77
@@ -262,7 +262,7 @@ srca_stop() {
011c77
 
011c77
 	OPTS=""
011c77
 	if [ "$OCF_RESKEY_destination" != "0.0.0.0/0" ] ;then
011c77
-		PRIMARY_IP="$($IP2UTIL -4 -o addr show dev eth0 primary | awk '{split($4,a,"/");print a[1]}')"
011c77
+		PRIMARY_IP="$($IP2UTIL -4 -o addr show dev $INTERFACE primary | awk '{split($4,a,"/");print a[1]}')"
011c77
 		OPTS="proto kernel scope host src $PRIMARY_IP"
011c77
 	fi
011c77