]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Handle netdev group for veth peer too
authorSergey Popovich <popovich_sergei@mail.ru>
Wed, 11 Dec 2013 12:25:07 +0000 (14:25 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 20 Dec 2013 16:27:51 +0000 (08:27 -0800)
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 <popovich_sergei@mail.ru>
ip/link_veth.c

index f357182f0031431c0a0c99cbb82b80f1da83be45..62cb5a55b5a8212dddbec9db354583330d148788 100644 (file)
@@ -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;
 }