提交 88c5b5ce 编写于 作者: M Michael Riesch 提交者: David S. Miller

rtnetlink: Call nlmsg_parse() with correct header length

Signed-off-by: NMichael Riesch <michael.riesch@omicron.at>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Benc <jbenc@redhat.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org
Acked-by: NMark Rustad <mark.d.rustad@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 69b0216a
...@@ -1072,7 +1072,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -1072,7 +1072,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
rcu_read_lock(); rcu_read_lock();
cb->seq = net->dev_base_seq; 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) { ifla_policy) >= 0) {
if (tb[IFLA_EXT_MASK]) if (tb[IFLA_EXT_MASK])
...@@ -1922,7 +1922,7 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh) ...@@ -1922,7 +1922,7 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
u32 ext_filter_mask = 0; u32 ext_filter_mask = 0;
u16 min_ifinfo_dump_size = 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) { ifla_policy) >= 0) {
if (tb[IFLA_EXT_MASK]) if (tb[IFLA_EXT_MASK])
ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册