From 54e36b9a00f02859e368c4fb3377cdca7da0e75f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 22 Apr 2007 22:49:58 +0000 Subject: [PATCH] Do not reload ipfw if it is already loaded. --- etc/inc/filter.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index ff4c78872f..8e61182544 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -126,8 +126,11 @@ function filter_configure_sync() { /* load ipfw / dummynet early on if required */ if($config['system']['dummynetshaper']) { - mwexec("/sbin/kldload ipfw"); - mwexec("/sbin/kldload dummynet"); + $status = intval(`kldstat | grep ipfw | wc -l | awk '{ print $1 }'`); + if($status == "0") { + mwexec("/sbin/kldload ipfw"); + mwexec("/sbin/kldload dummynet"); + } } else { /* check to see if any rules reference a schedule * and if so load ipfw for later usage.