integ/extended/iproute/centos/patches/ip-maddr-fix-ifname.patch
Dean Troyer 3cd12006bb StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-05-31 07:36:35 -07:00

28 lines
753 B
Diff

From 9a98e4f90d0f8990674ab00e292fe8ad70af1afe Mon Sep 17 00:00:00 2001
From: Tao Liu <tao.liu@windriver.com>
Date: Tue, 30 May 2017 18:06:10 -0400
Subject: [PATCH 1/1] ip maddr remove trailing colon from the interface name
---
ip/ipmaddr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c
index a77a18f..975bd57 100644
--- a/ip/ipmaddr.c
+++ b/ip/ipmaddr.c
@@ -143,6 +143,10 @@ static void read_igmp(struct ma_info **result_p)
if (buf[0] != '\t') {
sscanf(buf, "%d%s", &m.index, m.name);
+ /* remove last character if it is a colon */
+ if (strlen(m.name) > 0 && (m.name[strlen(m.name)-1] == ':')) {
+ m.name[strlen(m.name)-1] = 0;
+ }
continue;
}
--
1.8.3.1