From: Sergey Popovich Date: Wed, 11 Dec 2013 12:25:07 +0000 (+0200) Subject: Handle netdev group for veth peer too X-Git-Tag: v3.14.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0d47aa303d7224f9be10fd769592cca5090085f;p=thirdparty%2Fiproute2.git Handle netdev group for veth peer too 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 --- diff --git a/ip/link_veth.c b/ip/link_veth.c index f357182f0..62cb5a55b 100644 --- a/ip/link_veth.c +++ b/ip/link_veth.c @@ -56,6 +56,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; }