Skip to content

Commit

Permalink
net: fix validate_link_af in rtnetlink core
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kurt Van Dijck authored and David S. Miller committed Jan 27, 2011
1 parent 9eb7107 commit 6d3a9a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,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;
}
Expand Down

0 comments on commit 6d3a9a6

Please sign in to comment.