git: 1cd388ddf0d3 - stable/14 - rack_bbr_common: don't use stale pointer after m_pullup()

Michael Tuexen <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/14 has been updated by tuexen:

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

commit 1cd388ddf0d3ab5190bce65a3adaffcb8d2b07f7
Author:     Jana Smith <[email protected]>
AuthorDate: 2026-06-28 11:04:05 +0000
Commit:     Michael Tuexen <[email protected]>
CommitDate: 2026-08-06 05:46:14 +0000

    rack_bbr_common: don't use stale pointer after m_pullup()
    
    Reviewed by:            tuexen
    Differential Revision:  https://reviews.freebsd.org/D57816
    
    (cherry picked from commit be23edc1e4028e32a46e8fe7118de787fd5d79a2)
---
 sys/netinet/tcp_stacks/rack_bbr_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c
index 57dd242b9480..8b9a30a86397 100644
--- a/sys/netinet/tcp_stacks/rack_bbr_common.c
+++ b/sys/netinet/tcp_stacks/rack_bbr_common.c
@@ -175,7 +175,7 @@ ctf_get_enet_type(struct ifnet *ifp, struct mbuf *m)
 					return (-1);
 				}
 			}
-			ip6 = (struct ip6_hdr *)(eh + 1);
+			ip6 = mtod(m, struct ip6_hdr *);
 			th = (struct tcphdr *)(ip6 + 1);
 			drop_hdrlen = sizeof(*ip6);
 			tlen = ntohs(ip6->ip6_plen);
@@ -207,7 +207,7 @@ ctf_get_enet_type(struct ifnet *ifp, struct mbuf *m)
 					return (-1);
 				}
 			}
-			ip = (struct ip *)(eh + 1);
+			ip = mtod(m, struct ip *);
 			th = (struct tcphdr *)(ip + 1);
 			drop_hdrlen = sizeof(*ip);
 			iptos = ip->ip_tos;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.