git: 0312f80349ee - main - udp: use appropriate error counters
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Aug 2025 12:26:26 UTC
The branch main has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=0312f80349eedfc2b0d2f24b4fd073795148d3d5
commit 0312f80349eedfc2b0d2f24b4fd073795148d3d5
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-08-12 12:24:20 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-08-12 12:24:20 +0000
udp: use appropriate error counters
Since there are multicast and broadcast specific error counters,
use them.
Reviewed by: rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51869
---
sys/netinet/udp_usrreq.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index df8f293f9426..2f2f9abf1c83 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -654,7 +654,11 @@ udp_input(struct mbuf **mp, int *offp, int proto)
else
UDP_PROBE(receive, NULL, NULL, ip, NULL, uh);
UDPSTAT_INC(udps_noport);
- if (m->m_flags & (M_BCAST | M_MCAST)) {
+ if (m->m_flags & M_MCAST) {
+ UDPSTAT_INC(udps_noportmcast);
+ goto badunlocked;
+ }
+ if (m->m_flags & M_BCAST) {
UDPSTAT_INC(udps_noportbcast);
goto badunlocked;
}