ipv6: 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: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1099,8 +1099,9 @@ static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt)
|
||||
|
||||
memcpy(ndmsg + 1, opt, opt->nd_opt_len << 3);
|
||||
|
||||
NLA_PUT(skb, NDUSEROPT_SRCADDR, sizeof(struct in6_addr),
|
||||
&ipv6_hdr(ra)->saddr);
|
||||
if (nla_put(skb, NDUSEROPT_SRCADDR, sizeof(struct in6_addr),
|
||||
&ipv6_hdr(ra)->saddr))
|
||||
goto nla_put_failure;
|
||||
nlmsg_end(skb, nlh);
|
||||
|
||||
rtnl_notify(skb, net, 0, RTNLGRP_ND_USEROPT, NULL, GFP_ATOMIC);
|
||||
|
Reference in New Issue
Block a user