rtnetlink: Call nlmsg_parse() with correct header length
authorMichael Riesch <[email protected]>
Mon, 8 Apr 2013 05:45:26 +0000 (05:45 +0000)
committerDavid S. Miller <[email protected]>
Mon, 8 Apr 2013 21:12:26 +0000 (17:12 -0400)
Signed-off-by: Michael Riesch <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Benc <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: [email protected]
Acked-by: Mark Rustad <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/core/rtnetlink.c

index b65441da74abd85cc8deacc7650c583013e9dcfb..23854b51a259cb8b65c2bb1ee4be8e32e0ca0eb8 100644 (file)
@@ -1072,7 +1072,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
        rcu_read_lock();
        cb->seq = net->dev_base_seq;
 
-       if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
+       if (nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX,
                        ifla_policy) >= 0) {
 
                if (tb[IFLA_EXT_MASK])
@@ -1922,7 +1922,7 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
        u32 ext_filter_mask = 0;
        u16 min_ifinfo_dump_size = 0;
 
-       if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
+       if (nlmsg_parse(nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX,
                        ifla_policy) >= 0) {
                if (tb[IFLA_EXT_MASK])
                        ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);