netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix validate_link_af in rtnetlink core
@ 2011-01-26 14:55 Kurt Van Dijck
  2011-01-26 15:36 ` Patrick McHardy
  2011-01-27 22:33 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Kurt Van Dijck @ 2011-01-26 14:55 UTC (permalink / raw)
  To: netdev

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-27 22:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26 14:55 [PATCH] fix validate_link_af in rtnetlink core Kurt Van Dijck
2011-01-26 15:36 ` Patrick McHardy
2011-01-27 22:33 ` David Miller

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).