ipv6: Fix getsockopt() for some IPPROTO_IPV6 level socket options
Fix getsockopt() for the IPPROTO_IPV6 level socket options with the following names: IPV6_HOPOPTS, IPV6_RTHDR, IPV6_RTHDRDSTOPTS, IPV6_DSTOPTS, and IPV6_NEXTHOP. Reviewed by: markj MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D31458
This commit is contained in:
parent
696fca3fd4
commit
a8d54fc903
@ -2584,7 +2584,7 @@ ip6_pcbopt(int optname, u_char *buf, int len, struct ip6_pktopts **pktopt,
|
||||
pktopt = inp->in6p_outputopts; \
|
||||
if (pktopt && pktopt->field) { \
|
||||
optdatalen = min(lenexpr, sopt->sopt_valsize); \
|
||||
bcopy(&pktopt->field, optdata, optdatalen); \
|
||||
bcopy(pktopt->field, optdata, optdatalen); \
|
||||
} else { \
|
||||
free(optdata, M_TEMP); \
|
||||
optdata = NULL; \
|
||||
|
Loading…
Reference in New Issue
Block a user