Description: fix igmp parsing when iface is long
 Entries with long vhost names in /proc/net/igmp have no whitespace
 between name and colon, so sscanf() adds it to vhost and
 'ip maddr show iface' doesn't include inet result.
Author: Petr Vorel <pvorel@suse.cz>
Origin: upstream, https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?id=530903dd9003492edb0714e937ad4a5d1219e376
Bug-Ubuntu: https://launchpad.net/bugs/1732032
Last-Update: 2017-11-29
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ip/ipmaddr.c
+++ b/ip/ipmaddr.c
@@ -140,13 +140,17 @@
 
 	while (fgets(buf, sizeof(buf), fp)) {
 		struct ma_info *ma;
+		size_t len;
 
 		if (buf[0] != '\t') {
 			sscanf(buf, "%d%s", &m.index, m.name);
+			len = strlen(m.name);
+			if (m.name[len - 1] == ':')
+				len--;
 			continue;
 		}
 
-		if (filter.dev && strcmp(filter.dev, m.name))
+		if (filter.dev && strncmp(filter.dev, m.name, len))
 			continue;
 
 		sscanf(buf, "%08x%d", (__u32*)&m.addr.data, &m.users);
