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

Dimitry Andric <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Dimitry Andric <[email protected]> ---
Bisection shows this was introduced by r271396 [1].  Specifically, this part
that was added:

  2572                  if (ifp != NULL && (
  2573                      ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED))
  2574                          return (ENETDOWN);

The problem is that ND_IFINFO(ifp) dereferences ifp->if_afdata[AF_INET6]
unconditionally, so if that is NULL, a page fault occurs.

Maybe a good fix is just the following?

Index: sys/netinet6/ip6_output.c
===================================================================
--- sys/netinet6/ip6_output.c   (revision 271396)
+++ sys/netinet6/ip6_output.c   (working copy)
@@ -2569,7 +2569,7 @@
                        if (ifp == NULL)
                                return (ENXIO);
                }
-               if (ifp != NULL && (
+               if (ifp != NULL && ifp->if_afdata[AF_INET6] != NULL && (
                    ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED))
                        return (ENETDOWN);


[1] https://svnweb.freebsd.org/base?view=revision&revision=271396

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to