diff options
author | David S. Miller <davem@davemloft.net> | 2015-07-23 09:41:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-23 09:41:16 +0200 |
commit | c5e40ee287db61a79af1746954ee03ebbf1ff8a3 (patch) | |
tree | 007da00e75e9b84766ac4868421705300e1e2e14 /net/core/rtnetlink.c | |
parent | ip_tunnel: Provide tunnel metadata API for CONFIG_INET=n (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-c5e40ee287db61a79af1746954ee03ebbf1ff8a3.tar.xz linux-c5e40ee287db61a79af1746954ee03ebbf1ff8a3.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/bridge/br_mdb.c
br_mdb.c conflict was a function call being removed to fix a bug in
'net' but whose signature was changed in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 5fb4af20c6dd..788ceed39463 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -1808,10 +1808,13 @@ static int do_setlink(const struct sk_buff *skb, goto errout; nla_for_each_nested(attr, tb[IFLA_VF_PORTS], rem) { - if (nla_type(attr) != IFLA_VF_PORT) - continue; - err = nla_parse_nested(port, IFLA_PORT_MAX, - attr, ifla_port_policy); + if (nla_type(attr) != IFLA_VF_PORT || + nla_len(attr) < NLA_HDRLEN) { + err = -EINVAL; + goto errout; + } + err = nla_parse_nested(port, IFLA_PORT_MAX, attr, + ifla_port_policy); if (err < 0) goto errout; if (!port[IFLA_PORT_VF]) { |