diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-29 20:47:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-29 20:47:48 -0800 |
commit | 60b7379dc5b1743427b031cca53e30860a38ada6 (patch) | |
tree | c0462b8dd188861bd04f36dd31672b7446e35dd8 /drivers/net/ethernet/emulex | |
parent | a523a5ecc8c6ddceb8f783f600605553e5ad8963 (diff) | |
parent | 7a5a4f978750756755dc839014e13d1b088ccc8e (diff) | |
download | blackbird-op-linux-60b7379dc5b1743427b031cca53e30860a38ada6.tar.gz blackbird-op-linux-60b7379dc5b1743427b031cca53e30860a38ada6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 9070b98e15c4..dc77ec2bdafd 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -4311,11 +4311,16 @@ static int be_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh) return -EOPNOTSUPP; br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); + if (!br_spec) + return -EINVAL; nla_for_each_nested(attr, br_spec, rem) { if (nla_type(attr) != IFLA_BRIDGE_MODE) continue; + if (nla_len(attr) < sizeof(mode)) + return -EINVAL; + mode = nla_get_u16(attr); if (mode != BRIDGE_MODE_VEPA && mode != BRIDGE_MODE_VEB) return -EINVAL; |