Date: Sat, 16 Jul 2016 10:50:28 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302934 - stable/11/sys/netinet6 Message-ID: <201607161050.u6GAoSMl030174@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Jul 16 10:50:28 2016 New Revision: 302934 URL: https://svnweb.freebsd.org/changeset/base/302934 Log: MFC r302784: Fix a page fault in ip6_setpktopt(), occurring when the pflog module is loaded, and syncthing is started, which uses setsockopt(IPV6_PKGINFO). This is because pflog interfaces do not normally have an IPv6 address, causing the ND_IFINFO() macro to dereference a NULL pointer. Approved by: re (kib) Reviewed by: ae PR: 210943 Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Sat Jul 16 09:44:31 2016 (r302933) +++ stable/11/sys/netinet6/ip6_output.c Sat Jul 16 10:50:28 2016 (r302934) @@ -2659,8 +2659,8 @@ ip6_setpktopt(int optname, u_char *buf, if (ifp == NULL) return (ENXIO); } - if (ifp != NULL && ( - ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) + if (ifp != NULL && (ifp->if_afdata[AF_INET6] == NULL || + (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) != 0)) return (ENETDOWN); if (ifp != NULL &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607161050.u6GAoSMl030174>