From: Sergey Popovich <popovich_sergei@mail.ru>
To: netdev@vger.kernel.org
Subject: [PATCH 2/2] Handle netdev group for veth peer too
Date: Wed, 11 Dec 2013 14:25:07 +0200 [thread overview]
Message-ID: <2346820.DCsCcedb3C@tuxracer> (raw)
In-Reply-To: <cover.1386764590.git.popovich_sergei@mail.ru>
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 | 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
next parent reply other threads:[~2013-12-11 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1386764590.git.popovich_sergei@mail.ru>
2013-12-11 12:25 ` Sergey Popovich [this message]
2013-12-11 12:25 ` [PATCH 1/2] Initialize arguments to iplink_parse() by default Sergey Popovich
2013-12-20 16:27 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2346820.DCsCcedb3C@tuxracer \
--to=popovich_sergei@mail.ru \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).