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

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