git: 7294d2601f3a - main - Revert "UDP: let udp_pcblist() support UDP and UDP-Lite"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Oct 2025 21:19:53 UTC
The branch main has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=7294d2601f3a605dac3e86e232b43f29a0f5298d
commit 7294d2601f3a605dac3e86e232b43f29a0f5298d
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-10-20 21:19:29 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-10-20 21:19:29 +0000
Revert "UDP: let udp_pcblist() support UDP and UDP-Lite"
This reverts commit 5f6f2c3fa25b3f37936b564b433251c33b27a8b3.
Missing link to review.
---
sys/netinet/udp_usrreq.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 0a89d91dfc37..cea8a916679b 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -787,8 +787,7 @@ udplite_ctlinput(struct icmp *icmp)
static int
udp_pcblist(SYSCTL_HANDLER_ARGS)
{
- struct inpcbinfo *pcbinfo = udp_get_inpcbinfo(arg2);
- struct inpcb_iterator inpi = INP_ALL_ITERATOR(pcbinfo,
+ struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_udbinfo,
INPLOOKUP_RLOCKPCB);
struct xinpgen xig;
struct inpcb *inp;
@@ -800,7 +799,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
if (req->oldptr == 0) {
int n;
- n = pcbinfo->ipi_count;
+ n = V_udbinfo.ipi_count;
n += imax(n / 8, 10);
req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb);
return (0);
@@ -811,8 +810,8 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
bzero(&xig, sizeof(xig));
xig.xig_len = sizeof xig;
- xig.xig_count = pcbinfo->ipi_count;
- xig.xig_gen = pcbinfo->ipi_gencnt;
+ xig.xig_count = V_udbinfo.ipi_count;
+ xig.xig_gen = V_udbinfo.ipi_gencnt;
xig.xig_sogen = so_gencnt;
error = SYSCTL_OUT(req, &xig, sizeof xig);
if (error)
@@ -839,9 +838,9 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
* that something happened while we were processing this
* request, and it might be necessary to retry.
*/
- xig.xig_gen = pcbinfo->ipi_gencnt;
+ xig.xig_gen = V_udbinfo.ipi_gencnt;
xig.xig_sogen = so_gencnt;
- xig.xig_count = pcbinfo->ipi_count;
+ xig.xig_count = V_udbinfo.ipi_count;
error = SYSCTL_OUT(req, &xig, sizeof xig);
}
@@ -849,7 +848,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
}
SYSCTL_PROC(_net_inet_udp, UDPCTL_PCBLIST, pcblist,
- CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, IPPROTO_UDP,
+ CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0,
udp_pcblist, "S,xinpcb",
"List of active UDP sockets");