From nobody Wed Apr 13 23:09:41 2022 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 C3BA21B410C9; Wed, 13 Apr 2022 23:09:42 +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 4KdywQ0nFpz4lmQ; Wed, 13 Apr 2022 23:09:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891382; 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=kKFfvPf/o7RIZnMueDn9LW3wouq7SXrmM14ounPBgkM=; b=UjbUWDItUULNPqb21peDn8kWiikmh50f+JTiUveHoGTuy11Mrdh4eQIKzKYbAoF4fjsk0q 82EDKZncNo9+JuCuy5ju3Tr1apWftv60+LpQWP/0ju0+3or6ydr/nOxynmBsyy/g+Q1E/O n4zhmQdM9nQ463eOEgauV+kM0CrLFxXTUuU/dff4YlDHT5/bUvNB11KcSqEWgxaAWR2IEd DhZY0os73PAPWnwqLONYsEPa8yG+zA7zrFE30MwvheI6+rr4TIj0YsvI3K6vNlUd3NnOzy cp/wvXL05m45OO5gognf5eSqQwZOf0MzKmdXduE3DTWg085L+gQdGWNsxlUCBw== 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 D8ADD15264; Wed, 13 Apr 2022 23:09:41 +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 23DN9fst074715; Wed, 13 Apr 2022 23:09:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23DN9fUb074714; Wed, 13 Apr 2022 23:09:41 GMT (envelope-from git) Date: Wed, 13 Apr 2022 23:09:41 GMT Message-Id: <202204132309.23DN9fUb074714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f328c46fddea - main - TCP sysctl handlers: fin and lin are only used for INET. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f328c46fddea172ffe3dfce1921917151c84f30f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891382; 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=kKFfvPf/o7RIZnMueDn9LW3wouq7SXrmM14ounPBgkM=; b=f/wm3gGPjuYoNNm1pDxsFMR+6frzTwyolUFLKscxCHA4I/JSLaIY4nfgJJTRP4+QKdOKKW 59Tlme4YLqMv02feex9w/DKYf2NV7ERXmLS7uv8TA5nSTN2jZtro29OBUIQBKCIL7GlsqW TnuHxnDeLc7WpakbmWq9BUaug+cQg0VoAAb49RXKxdRVbGKvZp21zvxK7hhz8JgRiFIRC/ IwdyndPSrSLNXkYFhLeabQlbEKkM3v+WIl27vI1O9GgRnVRW+8lED/g6FDROGM7hFQdotE jKMbGVy/9VU/dSwtJRryLMM1Nf2MGLtrAe4yhRawIkc0wUb2/zjflGJ289wWkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649891382; a=rsa-sha256; cv=none; b=W0tLCuClLZ6uNSZcYhVGU6NAWwYyOs0m/lC9HsGX0/qvBWi6rkkCZU1GbzGr9gmAziNNnY f5v8zHx26emEE34JR4tOjRpQ1PXD/U0hLw+YilLUnEYwNNc58xPsVdPaeGz1x5k/9MYaog 4UNR2N3UHAhl0mjwGBcfLSHjKDnSKbNRdyOwhMcbKK57BiScQfR3+eC0U8zZoYNBqlzcKI 14gBcQ7goKr3469Es8OH05hMEgqRK8MXyGU1N04/oEadzxvZHgwhqKvRpudqP9B8Ezm8aD Ze55edwKMFD4KutbMJMrO0uCa+dQiYb3JsUuDnY3YhQxFwFt7HNIeOhnC4WlRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f328c46fddea172ffe3dfce1921917151c84f30f commit f328c46fddea172ffe3dfce1921917151c84f30f Author: John Baldwin AuthorDate: 2022-04-13 23:08:21 +0000 Commit: John Baldwin CommitDate: 2022-04-13 23:08:21 +0000 TCP sysctl handlers: fin and lin are only used for INET. --- sys/netinet/tcp_subr.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 3b02cd6d1945..3c5e6f2db9ec 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -3640,7 +3640,9 @@ sysctl_drop(SYSCTL_HANDLER_ARGS) struct inpcb *inp; struct tcpcb *tp; struct tcptw *tw; - struct sockaddr_in *fin, *lin; +#ifdef INET + struct sockaddr_in *fin = NULL, *lin = NULL; +#endif struct epoch_tracker et; #ifdef INET6 struct sockaddr_in6 *fin6, *lin6; @@ -3648,7 +3650,6 @@ sysctl_drop(SYSCTL_HANDLER_ARGS) int error; inp = NULL; - fin = lin = NULL; #ifdef INET6 fin6 = lin6 = NULL; #endif @@ -3677,8 +3678,10 @@ sysctl_drop(SYSCTL_HANDLER_ARGS) return (EINVAL); in6_sin6_2_sin_in_sock((struct sockaddr *)&addrs[0]); in6_sin6_2_sin_in_sock((struct sockaddr *)&addrs[1]); +#ifdef INET fin = (struct sockaddr_in *)&addrs[0]; lin = (struct sockaddr_in *)&addrs[1]; +#endif break; } error = sa6_embedscope(fin6, V_ip6_use_defzone); @@ -3768,7 +3771,9 @@ sysctl_switch_tls(SYSCTL_HANDLER_ARGS) /* addrs[0] is a foreign socket, addrs[1] is a local one. */ struct sockaddr_storage addrs[2]; struct inpcb *inp; - struct sockaddr_in *fin, *lin; +#ifdef INET + struct sockaddr_in *fin = NULL, *lin = NULL; +#endif struct epoch_tracker et; #ifdef INET6 struct sockaddr_in6 *fin6, *lin6; @@ -3776,7 +3781,6 @@ sysctl_switch_tls(SYSCTL_HANDLER_ARGS) int error; inp = NULL; - fin = lin = NULL; #ifdef INET6 fin6 = lin6 = NULL; #endif @@ -3805,8 +3809,10 @@ sysctl_switch_tls(SYSCTL_HANDLER_ARGS) return (EINVAL); in6_sin6_2_sin_in_sock((struct sockaddr *)&addrs[0]); in6_sin6_2_sin_in_sock((struct sockaddr *)&addrs[1]); +#ifdef INET fin = (struct sockaddr_in *)&addrs[0]; lin = (struct sockaddr_in *)&addrs[1]; +#endif break; } error = sa6_embedscope(fin6, V_ip6_use_defzone);