dcb: Add missing error check in dcb_ieee_set()

Missing error checking before nla_parse_nested().

Reported-by: Mark Rustad <[email protected]>
Signed-off-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
John Fastabend 2011-06-21 07:35:04 +00:00 • committed by David S. Miller
commit 4003b65871

View file

@ -1368,6 +1368,9 @@ static int dcbnl_ieee_set(struct net_device *netdev, struct nlattr **tb,
if (!ops)
return err;
if (!tb[DCB_ATTR_IEEE])
return -EINVAL;
err = nla_parse_nested(ieee, DCB_ATTR_IEEE_MAX,
tb[DCB_ATTR_IEEE], dcbnl_ieee_policy);
if (err)