diff options
author | Michael Riesch | 2013-04-08 00:45:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-05-01 11:46:18 -0500 |
commit | ec7491c1c7f3176569f9e8e097945db980189673 (patch) | |
tree | 892a3011546f364eb0d7dfa1e70c57a2be64b770 /net | |
parent | c642a760c494c82e7e415e14c5de4be3bf260056 (diff) | |
download | kernel-video-ec7491c1c7f3176569f9e8e097945db980189673.tar.gz kernel-video-ec7491c1c7f3176569f9e8e097945db980189673.tar.xz kernel-video-ec7491c1c7f3176569f9e8e097945db980189673.zip |
rtnetlink: Call nlmsg_parse() with correct header length
[ Upstream commit 88c5b5ce5cb57af6ca2a7cf4d5715fa320448ff9 ]
Signed-off-by: Michael Riesch <michael.riesch@omicron.at>
Cc: Jiri Benc <jbenc@redhat.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 6212ec9c2df..055fb130de1 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1068,7 +1068,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) | |||
1068 | rcu_read_lock(); | 1068 | rcu_read_lock(); |
1069 | cb->seq = net->dev_base_seq; | 1069 | cb->seq = net->dev_base_seq; |
1070 | 1070 | ||
1071 | if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, | 1071 | if (nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX, |
1072 | ifla_policy) >= 0) { | 1072 | ifla_policy) >= 0) { |
1073 | 1073 | ||
1074 | if (tb[IFLA_EXT_MASK]) | 1074 | if (tb[IFLA_EXT_MASK]) |
@@ -1924,7 +1924,7 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
1924 | u32 ext_filter_mask = 0; | 1924 | u32 ext_filter_mask = 0; |
1925 | u16 min_ifinfo_dump_size = 0; | 1925 | u16 min_ifinfo_dump_size = 0; |
1926 | 1926 | ||
1927 | if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, | 1927 | if (nlmsg_parse(nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX, |
1928 | ifla_policy) >= 0) { | 1928 | ifla_policy) >= 0) { |
1929 | if (tb[IFLA_EXT_MASK]) | 1929 | if (tb[IFLA_EXT_MASK]) |
1930 | ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); | 1930 | ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); |