Thread (1 message) 1 message, 1 author, 2013-12-11
DORMANTno replies

[PATCH 2/2] Handle netdev group for veth peer too

From: Sergey Popovich <hidden>
Date: 2013-12-11 12:29:52
Subsystem: the rest · Maintainer: Linus Torvalds

Currently ip-link(8) parses, but ignores "group" argument to
peer interface on veth creation.

Insert IFLA_GROUP attribute for peer interface when present.

Signed-off-by: Sergey Popovich <redacted>
---
 ip/link_veth.c |    3 +++
 1 file changed, 3 insertions(+)
diff --git a/ip/link_veth.c b/ip/link_veth.c
index 7730f39..98ff6a5 100644
--- a/ip/link_veth.c
+++ b/ip/link_veth.c
@@ -53,6 +53,9 @@ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
 		addattr_l(hdr, 1024, IFLA_IFNAME, name, len);
 	}
 
+	if (group != -1)
+		addattr32(hdr, 1024, IFLA_GROUP, group);
+
 	data->rta_len = (void *)NLMSG_TAIL(hdr) - (void *)data;
 	return argc - 1 - err;
 }
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help