diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2021-12-04 18:13:28 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2021-12-04 18:16:18 +0000 |
commit | 54912d47b629807cefaed5b65a8f4e6d9bbbdbcf (patch) | |
tree | 7855a0ee6edd684dda13f3bc7c99ab7793853218 | |
parent | f25d575762c7a4154901f9057e56743e554709cd (diff) | |
download | src-54912d47b629807cefaed5b65a8f4e6d9bbbdbcf.tar.gz src-54912d47b629807cefaed5b65a8f4e6d9bbbdbcf.zip |
sctp: unbreak NOINET6 builds.
PR: 260119
Reported by: kostikbel
MFC after: 1 week
-rw-r--r-- | sys/netinet/sctp_pcb.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 63a99cbc2c07..b4a742c11629 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2622,15 +2622,23 @@ sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); +#ifdef INET6 if (old_inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { new_inp->ip_inp.inp.inp_flags |= old_inp->ip_inp.inp.inp_flags & INP_CONTROLOPTS; if (old_inp->ip_inp.inp.in6p_outputopts) { new_inp->ip_inp.inp.in6p_outputopts = ip6_copypktopts(old_inp->ip_inp.inp.in6p_outputopts, M_NOWAIT); } - } else { + } +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET + { new_inp->ip_inp.inp.inp_ip_tos = old_inp->ip_inp.inp.inp_ip_tos; new_inp->ip_inp.inp.inp_ip_ttl = old_inp->ip_inp.inp.inp_ip_ttl; } +#endif new_inp->sctp_ep.time_of_secret_change = old_inp->sctp_ep.time_of_secret_change; memcpy(new_inp->sctp_ep.secret_key, old_inp->sctp_ep.secret_key, |