git: bd1d0850452e - main - udp_multi_input(): the UDP header is only needed for probes

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Fri, 03 Dec 2021 04:13:05 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=bd1d0850452ecd0bfa6a2ae4cd9938d302a59758

commit bd1d0850452ecd0bfa6a2ae4cd9938d302a59758
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2021-12-03 04:12:40 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2021-12-03 04:12:40 +0000

    udp_multi_input(): the UDP header is only needed for probes
    
    Reported by:    kib
    Fixes:          de2d47842e88
---
 sys/netinet/udp_usrreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index cd21b8640441..a6be949286b8 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -421,7 +421,9 @@ udp_multi_input(struct mbuf *m, int proto, struct sockaddr_in *udp_in)
 	struct ip *ip = mtod(m, struct ip *);
 	struct inpcb_iterator inpi = INP_ITERATOR(udp_get_inpcbinfo(proto),
 	    INPLOOKUP_RLOCKPCB, udp_multi_match, ip);
+#ifdef KDTRACE_HOOKS
 	struct udphdr *uh = (struct udphdr *)(ip + 1);
+#endif
 	struct inpcb *inp;
 	struct mbuf *n;
 	int appends = 0;