diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-12-29 02:55:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-12-29 02:55:33 +0000 |
commit | 3962b07000967cd9e6f27b5d3f61c5e673079caa (patch) | |
tree | 773604b42c0fb1975d809ea637d41075363c7b8e /etc/inc | |
parent | 85bf774742567bbb580532ceff2ba9fece20c43b (diff) | |
download | pfsense-3962b07000967cd9e6f27b5d3f61c5e673079caa.zip pfsense-3962b07000967cd9e6f27b5d3f61c5e673079caa.tar.gz |
Add filtering bridge toggle switch just like m0n0wall has.
Ticket #756
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index f3ecd0d..ce99b02 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -608,6 +608,20 @@ function find_carp_interface($ip) { } /* + * setup_filter_bridge(): toggle filtering bridge + */ +function setup_filter_bridge() { + global $config, $g; + if(isset($config['bridge']['filteringbridge'])) { + mwexec("sysctl net.link.bridge.pfil_member=1"); + mwexec("net.link.bridge.pfil_bridge=1"); + } else { + mwexec("sysctl net.link.bridge.pfil_member=0"); + mwexec("sysctl net.link.bridge.pfil_bridge=0"); + } +} + +/* * find_number_of_created_bridges(): returns the number of currently created bridges */ function find_number_of_created_bridges() { |