From nobody Fri Dec 10 10:41:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B303618D82C4; Fri, 10 Dec 2021 10:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J9SBq1Znpz3FJw; Fri, 10 Dec 2021 10:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11AE718F5A; Fri, 10 Dec 2021 10:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BAAfspQ016433; Fri, 10 Dec 2021 10:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BAAfsJd016432; Fri, 10 Dec 2021 10:41:54 GMT (envelope-from git) Date: Fri, 10 Dec 2021 10:41:54 GMT Message-Id: <202112101041.1BAAfsJd016432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c5f3adcce386 - stable/13 - sctp: unbreak NOINET6 builds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c5f3adcce3862cb800d64ae8fd332183ba6eb268 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639132915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWD0OnGesHO8fAMafLtI5qJu/LjoPXhhd1s7t+gb99o=; b=MORSp9vTTYmk6zJ2Rzdgis6h0cwHY5WLS80lFHm1NU7l6nQzqlAcbe4eCQzkNh5foderez SPYyy9BuLbTUiODrut+OcDGdAvRlQop7IT0Gd6Uguy/879xATE41EFVVClkGhMFxnv/jTR NBMqH17FW/mOcRsOe8y5hzEP20N6SUWM284Lt7Ik77W1QcIG1K0MU44ktmJD85WK/eeTgb slroHuCeXkGg9tpOyKpa3ZPzKSeI30OL+wqyMTLy406ZcsjFiwYJIjxhtz0BDVJsfRbS0w fU3EaFO6kpyUK6dCXNFHFx71DL43kTHWDhj674lARA/Q6MOTw+5j6rMRlYVnSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639132915; a=rsa-sha256; cv=none; b=Cm2KE5ZseMMMTrXLWRzYdDRpsvsE/W7TOBi+5O6IUvFF1OW5hoGEOVMJgZYDCfpCISr1XX naZw5q89yUmqACmKs/AvA+BiW1YkzRiDm0VC7az7msgUDOQnZT+KVapUr69xLkQ1IUZBXo RtEvo33af6gzm5yzVw5j1qM2n0YbJ9mxrAc13qSZyMR+J5BQGy7mgDYKEg+6N1DS/lX9+a qXr+f+Pm/RGdKbVkFcwvaWJH0shRdjrgyQ6jFZ9ipAkFLVqLNATq9mpqgeNy/Aa25Ql1Xx rrQ9jrf1xGq/Bkdd+iCAOoMgULBfGDiEM9+IEo+FzG4W2u0imz+TU4CGI8GRHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f3adcce3862cb800d64ae8fd332183ba6eb268 commit c5f3adcce3862cb800d64ae8fd332183ba6eb268 Author: Michael Tuexen AuthorDate: 2021-12-04 18:13:28 +0000 Commit: Michael Tuexen CommitDate: 2021-12-10 10:41:44 +0000 sctp: unbreak NOINET6 builds. PR: 260119 Reported by: kostikbel MFC after: 1 week (cherry picked from commit 54912d47b629807cefaed5b65a8f4e6d9bbbdbcf) --- sys/netinet/sctp_pcb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 86f315afe051..afca21d36125 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2627,15 +2627,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,