Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/phil-wifi]: src/sys/net Skip pfil_run_hooks if no packet filter enabled ...
details: https://anonhg.NetBSD.org/src/rev/7a9a92ff2640
branches: phil-wifi
changeset: 931350:7a9a92ff2640
user: nat <nat%NetBSD.org@localhost>
date: Mon Apr 27 07:27:35 2020 +0000
description:
Skip pfil_run_hooks if no packet filter enabled in the kernel.
diffstat:
sys/net/pfil.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 775d4cee37de -r 7a9a92ff2640 sys/net/pfil.c
--- a/sys/net/pfil.c Sat Apr 25 14:40:11 2020 +0000
+++ b/sys/net/pfil.c Mon Apr 27 07:27:35 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pfil.c,v 1.35.14.1 2020/04/08 14:08:57 martin Exp $ */
+/* $NetBSD: pfil.c,v 1.35.14.2 2020/04/27 07:27:35 nat Exp $ */
/*
* Copyright (c) 2013 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pfil.c,v 1.35.14.1 2020/04/08 14:08:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pfil.c,v 1.35.14.2 2020/04/27 07:27:35 nat Exp $");
#if defined(_KERNEL_OPT)
#include "opt_net_mpsafe.h"
@@ -398,6 +398,11 @@
int ret = 0;
KASSERT(dir == PFIL_IN || dir == PFIL_OUT);
+
+ if (__predict_false(ph == NULL)) {
+ return ret;
+ }
+
if (__predict_false((phlistset = pfil_hook_get(dir, ph)) == NULL)) {
return ret;
}
Home |
Main Index |
Thread Index |
Old Index