From nobody Tue Oct 04 03:57:36 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 4MhP6m4zNhz4dl6x; Tue, 4 Oct 2022 03:57:36 +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 4MhP6m41Lwz3sLC; Tue, 4 Oct 2022 03:57:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664855856; 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=7AQTieIuCyL2vSvCuXcK7ROUUOE0Ufpe63lGClI9dt4=; b=rKHz+20qqnr/0G72+R6v42zMucS930l54KO8nF9AAVWiV/zYIAjBocaFaq1ZYnn4L3USzW L+7LC5xl9khzIFY1eaqn9t2CrAoMRRnPWS5VxJeUcLxzaEWyNkuV3oOR19Fz2fJSicLHE3 0eTzyvEZELYSvMbCiEN0iFj2UF4h/EK0gU0LDRVwAsT/X3H0zjG3o1k/zA1qKlySuEvXQR OUwL6tcGYBkK1kWBCSLaeW7NOW4kMQsfWv+ArGOzw8bAXwNcqA7uYM5hKCxmRCeguGg3OS qVm9pNC6SdjBZKqbq+LJxPDX+4fGk57Qb1HY73mOATysVPrsKijHird0eres2w== 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 4MhP6m336PzR3p; Tue, 4 Oct 2022 03:57:36 +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 2943vaM9015411; Tue, 4 Oct 2022 03:57:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2943va7I015410; Tue, 4 Oct 2022 03:57:36 GMT (envelope-from git) Date: Tue, 4 Oct 2022 03:57:36 GMT Message-Id: <202210040357.2943va7I015410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 809fef291357 - main - netipsec: move specific ipsecmethods declarations to ipsec_support.h 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 809fef2913574cb37d2dadc00abfd62619d52040 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664855856; 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=7AQTieIuCyL2vSvCuXcK7ROUUOE0Ufpe63lGClI9dt4=; b=qMzl5z3LHHSMe4RYPyKxg2GJ48OXgDD36ptPp4jdPRYowh2xhihgj1ImZbFLIDCK6/mXZH ebHyKsm9LukJg6J8P3ViUTzCq2+2ZyTOz+MpELAlmRuHJrVnD4+jm57R+W7iZ9nsDohiJD ZNuXXH5m9nH0v/Ewu5dX0Q5ofv5upr6Ot7qqloatyOupQZqzbdDjmj8v1TXaQDa1YsbFb5 L5pBASDcAkrgUpVm1+hwnDYYF7z4ba8/UklVxtHIAz2zI5DsMb6zlAL/M+tPSm3OmTF8Xm 4w6x8jpFBSL4dKUSyt7BRIAQzIUhBetYJrs9NhCU5TDVnS0nWTAwXOQo5N3LhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664855856; a=rsa-sha256; cv=none; b=a1xQqd/AOUNodMCHOXL/vTEhTE7jz7hJWsh4cYy5lyJO7KwOsgwL2w0NuDUvIJCOJlnhvm fFj5paEQ0GPR4XFjDirD3EQoyYFs4rRkV9TkUNprBReGt27OI1muPrEvmnHM6kBsmsK7rJ oEBySsUbuyLgz7jjh+B3yEyU32NYs6rvlmpZ7AmDlcF5M6SZfKq+fGU36HxnStp0DAnkG6 dcsBckgqpohBo+RILnhNPAlBgjDbt8E8LZlwb7K8RrOZjm9c+4rYB2AK5WpuY8lsrmx16r 00MOzHAjr1p4wm8IagMf5QSqpV+fAEox4x29gC1SFPZ47FOUl1YCWUPWnKv6VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=809fef2913574cb37d2dadc00abfd62619d52040 commit 809fef2913574cb37d2dadc00abfd62619d52040 Author: Gleb Smirnoff AuthorDate: 2022-10-04 03:53:04 +0000 Commit: Gleb Smirnoff CommitDate: 2022-10-04 03:53:04 +0000 netipsec: move specific ipsecmethods declarations to ipsec_support.h where struct ipsec_methods is defined. Not a functional change. Allows further modification of method prototypes without breaking compilation of other ipsec compilation units. Differential revision: https://reviews.freebsd.org/D36730 --- sys/netipsec/ipsec.h | 9 --------- sys/netipsec/ipsec6.h | 7 ------- sys/netipsec/ipsec_input.c | 1 + sys/netipsec/ipsec_output.c | 1 + sys/netipsec/ipsec_support.h | 22 ++++++++++++++++++++++ 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index 85360f9b737c..e29fdbe29fa0 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -325,8 +325,6 @@ u_int ipsec_get_reqlevel(struct secpolicy *, u_int); void udp_ipsec_adjust_cksum(struct mbuf *, struct secasvar *, int, int); int udp_ipsec_output(struct mbuf *, struct secasvar *); -int udp_ipsec_input(struct mbuf *, int, int); -int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *); int ipsec_chkreplay(uint32_t, uint32_t *, struct secasvar *); int ipsec_updatereplay(uint32_t, struct secasvar *); @@ -338,14 +336,7 @@ void ipsec_setspidx_inpcb(struct inpcb *, struct secpolicyindex *, u_int); void ipsec4_setsockaddrs(const struct mbuf *, union sockaddr_union *, union sockaddr_union *); -int ipsec4_in_reject(const struct mbuf *, struct inpcb *); -int ipsec4_input(struct mbuf *, int, int); -int ipsec4_forward(struct mbuf *); -int ipsec4_pcbctl(struct inpcb *, struct sockopt *); -int ipsec4_output(struct mbuf *, struct inpcb *); -int ipsec4_capability(struct mbuf *, u_int); int ipsec4_common_input_cb(struct mbuf *, struct secasvar *, int, int); -int ipsec4_ctlinput(int, struct sockaddr *, void *); int ipsec4_check_pmtu(struct mbuf *, struct secpolicy *, int); int ipsec4_process_packet(struct mbuf *, struct secpolicy *, struct inpcb *); int ipsec_process_done(struct mbuf *, struct secpolicy *, struct secasvar *, diff --git a/sys/netipsec/ipsec6.h b/sys/netipsec/ipsec6.h index f690102fae2b..3654466a2889 100644 --- a/sys/netipsec/ipsec6.h +++ b/sys/netipsec/ipsec6.h @@ -66,14 +66,7 @@ struct secpolicy *ipsec6_checkpolicy(const struct mbuf *, void ipsec6_setsockaddrs(const struct mbuf *, union sockaddr_union *, union sockaddr_union *); -int ipsec6_input(struct mbuf *, int, int); -int ipsec6_in_reject(const struct mbuf *, struct inpcb *); -int ipsec6_forward(struct mbuf *); -int ipsec6_pcbctl(struct inpcb *, struct sockopt *); -int ipsec6_output(struct mbuf *, struct inpcb *); -int ipsec6_capability(struct mbuf *, u_int); int ipsec6_common_input_cb(struct mbuf *, struct secasvar *, int, int); -int ipsec6_ctlinput(int, struct sockaddr *, void *); int ipsec6_check_pmtu(struct mbuf *, struct secpolicy *, int); int ipsec6_process_packet(struct mbuf *, struct secpolicy *, struct inpcb *); diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c index 7effed48121a..fcc0b1999c63 100644 --- a/sys/netipsec/ipsec_input.c +++ b/sys/netipsec/ipsec_input.c @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #endif +#include #include #include #include diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 26588db6371b..ff0175e417cd 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -84,6 +84,7 @@ #ifdef INET6 #include #endif +#include #include #include #include diff --git a/sys/netipsec/ipsec_support.h b/sys/netipsec/ipsec_support.h index e4d0aea906f1..f285c31efa05 100644 --- a/sys/netipsec/ipsec_support.h +++ b/sys/netipsec/ipsec_support.h @@ -44,6 +44,28 @@ int ipsec_init_pcbpolicy(struct inpcb *); int ipsec_delete_pcbpolicy(struct inpcb *); int ipsec_copy_pcbpolicy(struct inpcb *, struct inpcb *); +#ifdef INET +int udp_ipsec_input(struct mbuf *, int, int); +int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *); +int ipsec4_in_reject(const struct mbuf *, struct inpcb *); +int ipsec4_input(struct mbuf *, int, int); +int ipsec4_forward(struct mbuf *); +int ipsec4_pcbctl(struct inpcb *, struct sockopt *); +int ipsec4_output(struct mbuf *, struct inpcb *); +int ipsec4_capability(struct mbuf *, u_int); +int ipsec4_ctlinput(int, struct sockaddr *, void *); +#endif /* INET */ + +#ifdef INET6 +int ipsec6_input(struct mbuf *, int, int); +int ipsec6_in_reject(const struct mbuf *, struct inpcb *); +int ipsec6_forward(struct mbuf *); +int ipsec6_pcbctl(struct inpcb *, struct sockopt *); +int ipsec6_output(struct mbuf *, struct inpcb *); +int ipsec6_capability(struct mbuf *, u_int); +int ipsec6_ctlinput(int, struct sockaddr *, void *); +#endif /* INET6 */ + struct ipsec_methods { int (*input)(struct mbuf *, int, int); int (*check_policy)(const struct mbuf *, struct inpcb *);