Blame SOURCES/bz1484473-ethmonitor-vlan-fix.patch

bb196a
From 5fae12629fcfbd00ef2433071d1c09503829624b Mon Sep 17 00:00:00 2001
bb196a
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
bb196a
Date: Fri, 25 Aug 2017 13:03:10 +0200
bb196a
Subject: [PATCH] ethmonitor: fix for VLAN interfaces
bb196a
bb196a
---
bb196a
 heartbeat/ethmonitor | 4 ++--
bb196a
 1 file changed, 2 insertions(+), 2 deletions(-)
bb196a
bb196a
diff --git a/heartbeat/ethmonitor b/heartbeat/ethmonitor
bb196a
index 81a7c0b75..6628c474d 100755
bb196a
--- a/heartbeat/ethmonitor
bb196a
+++ b/heartbeat/ethmonitor
bb196a
@@ -206,9 +206,9 @@ is_interface() {
bb196a
 	#
bb196a
 	# List interfaces but exclude FreeS/WAN ipsecN virtual interfaces
bb196a
 	#
bb196a
-	local iface=`$IP2UTIL -o -f link addr show | grep " $1:" \
bb196a
+	local iface=`$IP2UTIL -o -f link addr show | grep " $1\(@[A-Za-z0-9\.]*\)\?:" \
bb196a
 		| cut -d ' ' -f2 | sort -u | grep -v '^ipsec[0-9][0-9]*$' \
bb196a
-		| sed -e 's/:$//'`
bb196a
+		| sed -e 's/\(@.*\)\?:$//'`
bb196a
 		[ "$iface" != "" ]
bb196a
 }
bb196a