From nobody Sat Dec 4 18:16:25 2021 X-Original-To: dev-commits-src-main@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 AC07218CA0F5; Sat, 4 Dec 2021 18:16:25 +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 4J5yZ133Fsz4ypP; Sat, 4 Dec 2021 18:16:25 +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 49F1CB66; Sat, 4 Dec 2021 18:16:25 +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 1B4IGP5i072118; Sat, 4 Dec 2021 18:16:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B4IGPTC072117; Sat, 4 Dec 2021 18:16:25 GMT (envelope-from git) Date: Sat, 4 Dec 2021 18:16:25 GMT Message-Id: <202112041816.1B4IGPTC072117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 54912d47b629 - main - sctp: unbreak NOINET6 builds. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 54912d47b629807cefaed5b65a8f4e6d9bbbdbcf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638641785; 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=ZBx61+HTxPntUG8s1vicDtzLOCGub5VJeKIBjPWCrRU=; b=Q3NWeRrajBd4wI8sSlaOrD8ttybKuKKlIF3v4PotDd84wFHuQA2ERUEkcGaSV8FKwXHMWw cvC6MxM/tFbxoDn1S5iBoRDJlYuoNtJEQPyHShktwWcZjMcT1M73yBHKL/cn+kaJ6rtjrK C/M3isHYWeT77G81JMg2yL0SGYb8UPdqp+P1bswY11Jnf0QcfYpL7M6RMluQUWB9KyHMQz haiQIqftQ4yVQiitUDrYSYPxK6e1aLPQDbkTyPG+hkSedURVM+LENNpPX5iL8ASEhieR6q 5cxCB/Ry4IfrZBcHLfIHK9RumlnT9Qajj9y7XdiTFqCwNdr9mbK/Q3BWRss4Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638641785; a=rsa-sha256; cv=none; b=Sj/rNN6tcJDSDWZ6XorPGcGNG5PWuAZT97tc8IYQCC4x7MOmn0n/0jwh/4aY22jE8vpNro 3rIYwiBV6FuHRKlK/61Vf1pnT8sIhKEkVlGr814mi/CSWTggzvNjtivupBmE2KGIOmgM6U 7mHZ90m1S7wPLuSrgXZF5JmLHDh6M0004AvdbXcf0VrSX6CPCSSZ1NO6gxqC4DSdF6vddb c2jW64z9icTslv4UYtEgSw9kMbg31qv4wcKaU0/reXg0lAaW+kyO6ZXt+1QUUHajE1tA8N 1n9ZI0/qJhWIFUNAUVOHzT6vP2kYY5oEhhjBnh5EbOv3fkZAhOe7YwNy+P1d9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=54912d47b629807cefaed5b65a8f4e6d9bbbdbcf commit 54912d47b629807cefaed5b65a8f4e6d9bbbdbcf Author: Michael Tuexen AuthorDate: 2021-12-04 18:13:28 +0000 Commit: Michael Tuexen CommitDate: 2021-12-04 18:16:18 +0000 sctp: unbreak NOINET6 builds. PR: 260119 Reported by: kostikbel MFC after: 1 week --- 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 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,