Date: Fri, 14 Nov 2025 19:24:28 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 279653] Page fault in in6_selecthlim Message-ID: <bug-279653-7501-KXRlDRBYzG@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-279653-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-279653-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279653 --- Comment #20 from Zhenlei Huang <zlei@FreeBSD.org> --- (In reply to Zhenlei Huang from comment #1) I managed to repeat this bug with the steps in PR 291003, and with a slightly modified in6_selecthlim(), now the gdb report the right line. ``` diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 3e55c6e5fc05..0909969cc374 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -868,9 +868,12 @@ in6_selecthlim(struct inpcb *inp, struct ifnet *ifp) if (inp && inp->in6p_hops >= 0) return (inp->in6p_hops); - else if (ifp) - return (ND_IFINFO(ifp)->chlim); - else if (inp && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { + else if (ifp != NULL) { + struct in6_ifextra *ext = ifp->if_afdata[AF_INET6]; + if (ext != NULL && ext->nd_ifinfo != NULL) + return (ext->nd_ifinfo->chlim); + // return (((struct in6_ifextra *)ifp->if_afdata[AF_INET6])->nd_ifinfo->chlim); + } else if (inp && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { struct nhop_object *nh; struct in6_addr dst; uint32_t fibnum, scopeid; ``` > So I suspect the line number 850 by kgdb is wrong, and the correct one should be 861. I can now confirm that. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279653-7501-KXRlDRBYzG>
