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

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