From: Kurt Van Dijck Date: Wed, 26 Jan 2011 04:55:24 +0000 (+0000) Subject: net: fix validate_link_af in rtnetlink core X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d3a9a685465986d7653c5abbc0b24681e7c44d7;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git net: fix validate_link_af in rtnetlink core 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 Signed-off-by: David S. Miller --- diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 750db57f3bb..31459ef13ca 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -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; }