https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279653

--- Comment #20 from Zhenlei Huang <[email protected]> ---
(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.

Reply via email to