[Bug 210943] Page fault in ip6_setpktopts when syncthing is started with pflog loaded
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jul 10 16:10:17 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210943
Dimitry Andric <dim at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ae at FreeBSD.org
--- Comment #1 from Dimitry Andric <dim at FreeBSD.org> ---
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.
More information about the freebsd-bugs
mailing list