git: 9eb5c85c70fc - stable/14 - udp: use appropriate error counters
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Sep 2025 18:59:57 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=9eb5c85c70fcfeeaab9d2d5410a566e16309ced1
commit 9eb5c85c70fcfeeaab9d2d5410a566e16309ced1
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-08-12 12:24:20 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-09-05 18:59:32 +0000
udp: use appropriate error counters
Since there are multicast and broadcast specific error counters,
use them.
Reviewed by: rrs
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51869
(cherry picked from commit 0312f80349eedfc2b0d2f24b4fd073795148d3d5)
---
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 1ea44c45a390..f44bd1838d07 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -656,7 +656,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;
}