From nobody Wed Dec 07 19:52:02 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 4NS7GW1f83z4jghF; Wed, 7 Dec 2022 19:52:03 +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 4NS7GW0nKcz3Msq; Wed, 7 Dec 2022 19:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670442723; 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=TDJejQL0VBYanPbh8bBLdbXUvFhjKqDDD0qnlxM8RHI=; b=CeAxOu+NZkaeccypORaNnVAGo+7WfGwAie4yeBR4Sih6paQg2JDVdBFMeOaSm7NLUUpl6o f79WuVCUSxBIidU/NebZFDo8wB+qRj25oFmbm54Ozvb5klI9bwQmh5uIEHe50RDxAeVGEX MME8gP0XCgiO7StSeCVg7IaRUayMZEbAYC7Q5zc244Wt/ve5mYmwwigMIMPaFLPb/R9qM0 wYKrhrHimahoRJimcwjOymYr9c//Pv/ec4czBu6kCt7YkrylqCiFDLi4EinMig37sAMomD 3DeM07vAejeAtnTOSmKLWqzCTXBcWoqOmSj3WaPYqdTfSHoa96mZ7SGk0QT8FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670442723; 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=TDJejQL0VBYanPbh8bBLdbXUvFhjKqDDD0qnlxM8RHI=; b=k875Rp3Pi103tJ+Uh0Tft9W1NjHKFyHDZApP1DNnfwlilBt3ajci1oD9nAR/YpdzV9Aly6 m8oLVusu0DYppFeh2pwSsndDTKOWe2MDt9LZ708S+FFMk8OqhzSV9LEBBmRU9XxzSr/Swc uOejYzYi20IRnDG0u6arPBfwd76Ph/AsjxpIensiAC9FSCAiNV1VJ+kA9tbNOKp3xzE2uR dTluypFIQhLYNBeEy3PPUvfO/+MSs7vu0yq1LjAFopjd5meg2VUPOsE+28MgHjuPsY4+E6 rx1bwL6lPbaClPUkphLykGAaEGNUbVYnz+5E1pt/YdgUzqqBZdPmGEBM7r8M2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670442723; a=rsa-sha256; cv=none; b=EgaIBVznI2lsc3iiV6DnDehI7H3dRLSKyJp+SZRaSWLbpEEmg82R/rin7EQiR3jfKLfheP ufLztvlgiuFH1/WyuugKHQS/ZfCjexzGuXx+WYjn9j9HDQKLXEmTQTt4ct1g1qwNCibbe9 JHM3CD2JAuxUuwnjIqLcsX08jUohdKcGxFwMzxcNYmmZ71UseSWypyEjRRv7EIZkzxKgTR 6BdPJdK7p7WvFeArkBX0uEjfWpLUWx5Z6oTd/8gb80gktoBqA7imjERXag2TrgStGFOsJN g82QeQAVVHEJcqBvy8UR2ncqXmKWkXlPnKzHHXjof9U8k7mBCDIvahd4u1cqjg== 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 4NS7GV6ybWzTR3; Wed, 7 Dec 2022 19:52:02 +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 2B7Jq2OF028276; Wed, 7 Dec 2022 19:52:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B7Jq24s028275; Wed, 7 Dec 2022 19:52:02 GMT (envelope-from git) Date: Wed, 7 Dec 2022 19:52:02 GMT Message-Id: <202212071952.2B7Jq24s028275@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: 1aed3b34301e - main - udp: add protocol method declarations to udp_var.h 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1aed3b34301e33eb8f64d7abc968fcbe5d6171ca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1aed3b34301e33eb8f64d7abc968fcbe5d6171ca commit 1aed3b34301e33eb8f64d7abc968fcbe5d6171ca Author: Gleb Smirnoff AuthorDate: 2022-12-07 19:51:49 +0000 Commit: Gleb Smirnoff CommitDate: 2022-12-07 19:51:49 +0000 udp: add protocol method declarations to udp_var.h They are shared between UDP over IPv4 and over IPv6. To prevent all possible kernel build failures wrap them in #ifdef _SYS_PROTOSW_H_. Prompted by feedback from jhb@ and jrtc27@ on c93db4abf454. --- sys/netinet/tcp_syncache.c | 1 - sys/netinet/udp_usrreq.c | 3 --- sys/netinet/udp_var.h | 6 ++++++ sys/netinet6/udp6_usrreq.c | 6 ------ 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index ad1811fc68cd..00d0ac2fa9d5 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -94,7 +94,6 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include #include diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 011e20692935..19c163e95094 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1037,7 +1037,6 @@ udp_v4mapped_pktinfo(struct cmsghdr *cm, struct sockaddr_in * src, } #endif /* INET6 */ -pr_send_t udp_send; /* shared with udp6_usrreq.c */ int udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td) @@ -1445,7 +1444,6 @@ release: return (error); } -pr_abort_t udp_abort; /* shared with udp6_usrreq.c */ void udp_abort(struct socket *so) { @@ -1630,7 +1628,6 @@ udp_detach(struct socket *so) in_pcbfree(inp); } -pr_disconnect_t udp_disconnect; /* shared with udp6_usrreq.c */ int udp_disconnect(struct socket *so) { diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index 26e56be53f16..2b91518c0ff3 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -176,6 +176,12 @@ int udp_shutdown(struct socket *so); int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f, udp_tun_icmp_t i, void *ctx); +#ifdef _SYS_PROTOSW_H_ +pr_abort_t udp_abort; +pr_disconnect_t udp_disconnect; +pr_send_t udp_send; +#endif + #endif /* _KERNEL */ #endif /* _NETINET_UDP_VAR_H_ */ diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 79fe7d4cc0fb..484f43d24808 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -131,12 +131,6 @@ SYSCTL_INT(_net_inet6_udp6, OID_AUTO, rfc6935_port, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(zero_checksum_port), 0, "Zero UDP checksum allowed for traffic to/from this port."); - -/* netinet/udp_usrreqs.c */ -pr_abort_t udp_abort; -pr_disconnect_t udp_disconnect; -pr_send_t udp_send; - /* * UDP protocol implementation. * Per RFC 768, August, 1980.