* [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
* Re: [PATCH] fix validate_link_af in rtnetlink core
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
1 sibling, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2011-01-26 15:36 UTC (permalink / raw)
To: Kurt Van Dijck; +Cc: netdev
On 26.01.2011 15:55, Kurt Van Dijck wrote:
> 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.
There's code in libnl using this, your patch looks fine to me.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix validate_link_af in rtnetlink core
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
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-01-27 22:33 UTC (permalink / raw)
To: kurt.van.dijck; +Cc: netdev
From: Kurt Van Dijck <kurt.van.dijck@eia.be>
Date: Wed, 26 Jan 2011 15:55:24 +0100
> 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>
Applied, thanks.
^ permalink raw reply [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).