From: Kurt Van Dijck <kurt.van.dijck@eia.be>
To: netdev@vger.kernel.org
Subject: [PATCH] fix validate_link_af in rtnetlink core
Date: Wed, 26 Jan 2011 15:55:24 +0100 [thread overview]
Message-ID: <20110126145523.GA3171@e-circ.dyndns.org> (raw)
Hi,
I'm not sure about this patch.
I'm testing an API that uses IFLA_AF_SPEC attribute.
In the rtnetlink core , the set_link_af() member
of the rtnl_af_ops struct receives the nested attribute
(as I expected), but the validate_link_af() member
receives the parent attribute.
IMO, this patch fixes this.
Since I didn't find any code in iproute2 that makes use
of this attribute, I wasn't able to verify this on the userspace
end.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
---
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 310eb80..c6aee92 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1122,8 +1122,7 @@ static int validate_linkmsg(struct net_device *dev, struct nlattr *tb[])
return -EOPNOTSUPP;
if (af_ops->validate_link_af) {
- err = af_ops->validate_link_af(dev,
- tb[IFLA_AF_SPEC]);
+ err = af_ops->validate_link_af(dev, af);
if (err < 0)
return err;
}
next reply other threads:[~2011-01-26 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 14:55 Kurt Van Dijck [this message]
2011-01-26 15:36 ` [PATCH] fix validate_link_af in rtnetlink core Patrick McHardy
2011-01-27 22:33 ` David Miller
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=20110126145523.GA3171@e-circ.dyndns.org \
--to=kurt.van.dijck@eia.be \
--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).