From nobody Wed Feb 09 18:58:44 2022 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 2E53D19A861D; Wed, 9 Feb 2022 18:58:45 +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 4Jv8Kx0nk9z4pBG; Wed, 9 Feb 2022 18:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644433125; 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=te8pIT20plPuZ+QsbCFQsplIIxjD0fbBNYVeZuIg/Ao=; b=bmaxAp9LQPeU5uga0Wj00qPuLxwThmJ6w+BCIMlIq9yiEGAODHhS68Efkhp86zBM6qavh8 B6cDynt7DtV2Ga8+lqxOKnjGJljgCiJydoZ7a6BdW3KHaYqOTzp3MQRw2nm9zJGoM4uFO+ tv+RTzE99CrEQRZ75r4WuEIqxT01QzW5d4RXXw8fECSCgBA5RQtKTVIoOog7Zvl+BirNaM VnmLPxu/pDiuv5+2Ft8putPONGtZUUt/41H0c+31z3Jyj5cmWvJs4/2eF4Qqlqhb+zZW90 MNfV4xzeyOQQa2NCoI7UIS6UJUX1at9frU00DXU+/BzP9ZV/9AkFWkmNSNtt4w== 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 EB6301289B; Wed, 9 Feb 2022 18:58:44 +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 219Iwibc041312; Wed, 9 Feb 2022 18:58:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 219IwiiO041311; Wed, 9 Feb 2022 18:58:44 GMT (envelope-from git) Date: Wed, 9 Feb 2022 18:58:44 GMT Message-Id: <202202091858.219IwiiO041311@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: a0aeb1cef53b - main - in_pcb.c: fix compilation of an IPv4 only configuration 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: a0aeb1cef53ba782eb242597e5dcb715861ec270 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644433125; 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=te8pIT20plPuZ+QsbCFQsplIIxjD0fbBNYVeZuIg/Ao=; b=l+Ff9kM2i5Zr1Kvo8xyudAklUDm8hiKVewbbIbz9iOCZC2vF/kHtUpBk0QHxbnI/tdFmVt bdNrVa1XJynMdqZiPLXh3fX+cfBpFNoL5LQHxhGGv8jA/Fz/rlsl2WK7e8mKAGpVh1MVCC DzeMQF7rfgHTgP/oGFxFAgCAY9jpkit3PzVv21tRLT9IoDIT5AEEzbHSCstnbGH7eSe+Le 17wY/Ng3hMWtZH1l7WlMKOG0p3vGazAWK934ASnBPCxglaEljZq9P84wz1Mw2MG8Pmx6c6 u1w99ovjHtzKmxRtA+BIb8NR4LYdLdsjAAbZrvkB7vseio+tIgnRTLBjWP0sVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644433125; a=rsa-sha256; cv=none; b=oQQM53rY//d8oz5fWUrFI2T4epWE4+GqHGqkNI0XF9XhW8mUj3WlZnmqdOHEyi2fmMnvlX k9nKmAe9RQwCb1SWGanvDK8h3qSp5/rD4JFrYQvhjnKG6xoUzX569oBmEVJfC/mMm7VL8x NYZIRFeBFqDoyOnkgBz+j4hsDbYr0BmPKcOgxSSvS7VTmAHNqMDXFL3J6ClCvMUfTft0uf A+K+MvDCnCX3p4eT/bAhNl3B0hMZSCDDRzVd2ZS/7m+xnUk7bn0AJ7LnSeoY1aNdQPSj+w ALgbBO9ErUIEGl4a+JBhxzaLKIKCoLg7vaAyGhlMW1wHOIg5fgzfOxgP2Igr1A== 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=a0aeb1cef53ba782eb242597e5dcb715861ec270 commit a0aeb1cef53ba782eb242597e5dcb715861ec270 Author: Michael Tuexen AuthorDate: 2022-02-09 18:53:39 +0000 Commit: Michael Tuexen CommitDate: 2022-02-09 18:58:29 +0000 in_pcb.c: fix compilation of an IPv4 only configuration While there, remove a duplicate inclusion of sysctl.h. Reported by: Gary Jennejohn Fixes: a35bdd4489b9 - main - tcp: add sysctl interface for setting socket options Sponsored by: Netflix, Inc. --- sys/netinet/in_pcb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 147e0b88214d..25a01bc0c4e5 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -2831,6 +2830,7 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, sopt.sopt_val = params->sop_optval; sopt.sopt_valsize = req->newlen - sizeof(struct sockopt_parameters); sopt.sopt_td = NULL; +#ifdef INET6 if (params->sop_inc.inc_flags & INC_ISIPV6) { if (IN6_IS_SCOPE_LINKLOCAL(¶ms->sop_inc.inc6_laddr)) params->sop_inc.inc6_laddr.s6_addr16[1] = @@ -2839,11 +2839,13 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, params->sop_inc.inc6_faddr.s6_addr16[1] = htons(params->sop_inc.inc6_zoneid & 0xffff); } +#endif if (params->sop_inc.inc_lport != htons(0)) { if (params->sop_inc.inc_fport == htons(0)) inpi.hash = INP_PCBHASH_WILD(params->sop_inc.inc_lport, pcbinfo->ipi_hashmask); else +#ifdef INET6 if (params->sop_inc.inc_flags & INC_ISIPV6) inpi.hash = INP6_PCBHASH( ¶ms->sop_inc.inc6_faddr, @@ -2851,6 +2853,7 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, params->sop_inc.inc_fport, pcbinfo->ipi_hashmask); else +#endif inpi.hash = INP_PCBHASH( ¶ms->sop_inc.inc_faddr, params->sop_inc.inc_lport,