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 <popovich_sergei@mail.ru>
This commit is contained in:
Sergey Popovich 2013-12-11 14:25:07 +02:00 committed by Stephen Hemminger
parent be2c3142f9
commit e0d47aa303
1 changed files with 3 additions and 0 deletions

View 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;
}