提交 ead9a76c 编写于 作者: D David S. Miller

macvlan: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1a106de6
......@@ -773,7 +773,8 @@ static int macvlan_fill_info(struct sk_buff *skb,
{
struct macvlan_dev *vlan = netdev_priv(dev);
NLA_PUT_U32(skb, IFLA_MACVLAN_MODE, vlan->mode);
if (nla_put_u32(skb, IFLA_MACVLAN_MODE, vlan->mode))
goto nla_put_failure;
return 0;
nla_put_failure:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册