]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net: fix validate_link_af in rtnetlink core
authorKurt Van Dijck <kurt.van.dijck@eia.be>
Wed, 26 Jan 2011 04:55:24 +0000 (04:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Jan 2011 22:39:21 +0000 (14:39 -0800)
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>
net/core/rtnetlink.c

index 750db57f3bb3e628b44a481c11eea954d21ce88d..31459ef13ca2bdb7350b51fa6be371b6c89d1b50 100644 (file)
@@ -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;
                        }