Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Fix panic in pfil_run_hooks on bootup



details:   https://anonhg.NetBSD.org/src/rev/48d16345e7ed
branches:  trunk
changeset: 349891:48d16345e7ed
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Dec 27 10:53:11 2016 +0000

description:
Fix panic in pfil_run_hooks on bootup

XXX a kernel with pf still fails to boot up. Please someone fix it.

diffstat:

 sys/netinet/in.c   |  7 +++----
 sys/netinet6/in6.c |  9 ++++-----
 2 files changed, 7 insertions(+), 9 deletions(-)

diffs (59 lines):

diff -r 79e9f55ecabe -r 48d16345e7ed sys/netinet/in.c
--- a/sys/netinet/in.c  Tue Dec 27 10:30:24 2016 +0000
+++ b/sys/netinet/in.c  Tue Dec 27 10:53:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.c,v 1.192 2016/12/26 00:30:07 knakahara Exp $       */
+/*     $NetBSD: in.c,v 1.193 2016/12/27 10:53:11 ozaki-r Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.192 2016/12/26 00:30:07 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.193 2016/12/27 10:53:11 ozaki-r Exp $");
 
 #include "arp.h"
 
@@ -705,8 +705,7 @@
 
        if (error == 0) {
                if (run_hook)
-                       (void)pfil_run_hooks(if_pfil,
-                           (struct mbuf **)cmd, ifp, PFIL_IFADDR);
+                       pfil_run_addrhooks(if_pfil, cmd, iatoifa(ia));
        } else if (newifaddr) {
                KASSERT(ia != NULL);
                in_purgeaddr(&ia->ia_ifa);
diff -r 79e9f55ecabe -r 48d16345e7ed sys/netinet6/in6.c
--- a/sys/netinet6/in6.c        Tue Dec 27 10:30:24 2016 +0000
+++ b/sys/netinet6/in6.c        Tue Dec 27 10:53:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6.c,v 1.226 2016/12/21 08:47:02 ozaki-r Exp $        */
+/*     $NetBSD: in6.c,v 1.227 2016/12/27 10:53:12 ozaki-r Exp $        */
 /*     $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $   */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.226 2016/12/21 08:47:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.227 2016/12/27 10:53:12 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -719,10 +719,9 @@
                error = ENOTTY;
        }
 release:
+       if (run_hooks)
+               pfil_run_addrhooks(if_pfil, cmd, (struct ifaddr *)ia);
        ia6_release(ia, &psref);
-
-       if (run_hooks)
-               pfil_run_hooks(if_pfil, (struct mbuf **)cmd, ifp, PFIL_IFADDR);
 out:
        curlwp_bindx(bound);
        return error;



Home | Main Index | Thread Index | Old Index