Module Name: src Committed By: mlelstv Date: Sat Feb 18 18:08:16 UTC 2017
Modified Files: src/sys/net/npf: npf_ext_log.c Log Message: npf_ifmap_getname requires the config to be locked. For now, just prevent the crash. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf_ext_log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/npf/npf_ext_log.c diff -u src/sys/net/npf/npf_ext_log.c:1.11 src/sys/net/npf/npf_ext_log.c:1.12 --- src/sys/net/npf/npf_ext_log.c:1.11 Sun Jan 29 00:15:54 2017 +++ src/sys/net/npf/npf_ext_log.c Sat Feb 18 18:08:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ext_log.c,v 1.11 2017/01/29 00:15:54 christos Exp $ */ +/* $NetBSD: npf_ext_log.c,v 1.12 2017/02/18 18:08:16 mlelstv Exp $ */ /*- * Copyright (c) 2010-2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #ifdef _KERNEL #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: npf_ext_log.c,v 1.11 2017/01/29 00:15:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_ext_log.c,v 1.12 2017/02/18 18:08:16 mlelstv Exp $"); #include <sys/types.h> #include <sys/module.h> @@ -104,9 +104,13 @@ npf_log(npf_cache_t *npc, void *meta, co hdr.action = *decision == NPF_DECISION_PASS ? 0 /* pass */ : 1 /* block */; hdr.reason = 0; /* match */ +#if 0 struct nbuf *nb = npc->npc_nbuf; const char *ifname = nb && nb->nb_ifid ? npf_ifmap_getname(npc->npc_ctx, nb->nb_ifid) : "???"; +#else + const char *ifname = "???"; +#endif strlcpy(hdr.ifname, ifname, sizeof(hdr.ifname));