Re: git: c93db4abf454 - main - udp: call UDP methods from UDP over IPv6 directly

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 17 Aug 2022 16:04:08 UTC
On 8/16/22 12:40 PM, Gleb Smirnoff wrote:
> The branch main has been updated by glebius:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=c93db4abf4545d1bc8cb2b67eacd17f6d1ee6b74
> 
> commit c93db4abf4545d1bc8cb2b67eacd17f6d1ee6b74
> Author:     Gleb Smirnoff <glebius@FreeBSD.org>
> AuthorDate: 2022-08-16 19:40:36 +0000
> Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
> CommitDate: 2022-08-16 19:40:36 +0000
> 
>      udp: call UDP methods from UDP over IPv6 directly
>      
>      Both UDP and UDP Lite use same methods on sockets.  Both UDP over IPv4
>      and over IPv6 use same methods.  Don't pretend that methods can switch
>      and remove this unneeded complexity.
>      
>      Reviewed by:            melifaro
>      Differential revision:  https://reviews.freebsd.org/D36154
> ---
>   sys/netinet/udp_usrreq.c   |  9 ++++++---
>   sys/netinet6/udp6_usrreq.c | 37 +++++++++++--------------------------
>   2 files changed, 17 insertions(+), 29 deletions(-)
> 
> diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
> index a7bdfce97707..6a3ac2abd90b 100644
> --- a/sys/netinet6/udp6_usrreq.c
> +++ b/sys/netinet6/udp6_usrreq.c
> @@ -131,12 +131,18 @@ VNET_DEFINE(int, zero_checksum_port) = 0;
>   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;
> +

Oof, can you please put these in a header instead?  <netinet/udp_var.h> would seem to be
a good candidate.

-- 
John Baldwin