diff options
author | jim-p <jimp@pfsense.org> | 2011-05-31 16:01:00 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-05-31 16:01:00 -0400 |
commit | 174e729e3400f0d5403eb5b1676c9519bc15598c (patch) | |
tree | 3766d38b3933325b29eab641010a516dce7f11a2 /config/ntop2/ntop.xml | |
parent | d3fe0fa229b7f390d363c80c06e5ef684ce34e52 (diff) | |
download | pfsense-packages-174e729e3400f0d5403eb5b1676c9519bc15598c.tar.gz pfsense-packages-174e729e3400f0d5403eb5b1676c9519bc15598c.tar.bz2 pfsense-packages-174e729e3400f0d5403eb5b1676c9519bc15598c.zip |
Add toggles to the ntop settings for merging interfaces and for ipv4 only, default to the old behavior (no merging, v4 only.)
Diffstat (limited to 'config/ntop2/ntop.xml')
-rw-r--r-- | config/ntop2/ntop.xml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/config/ntop2/ntop.xml b/config/ntop2/ntop.xml index d5eaab0e..3f603dc9 100644 --- a/config/ntop2/ntop.xml +++ b/config/ntop2/ntop.xml @@ -92,6 +92,16 @@ <value>lan</value> <multiple>true</multiple> </field> + <field> + <fielddescr>Allow merging interfaces<br>(Def: Do not merge)</fielddescr> + <fieldname>allowmerge</fieldname> + <type>checkbox</type> + </field> + <field> + <fielddescr>Track all traffic<br>(Def: IPv4 only)</fielddescr> + <fieldname>alltraffic</fieldname> + <type>checkbox</type> + </field> </fields> <custom_php_global_functions> <![CDATA[ @@ -115,6 +125,8 @@ if($ntop_config['password'] and $ntop_config['passwordagain']) { if($ntop_config['password'] == $ntop_config['passwordagain']) { $first = 0; + $mergeifs = ($ntop_config['allowmerge'] == "on") ? "" : "-M"; + $alltraffic = ($ntop_config['alltraffic'] == "on") ? "" : "--ipv4"; foreach($ntop_config['interface_array'] as $iface) { $if = convert_friendly_interface_to_real_interface_name($iface); if($if) { @@ -125,7 +137,7 @@ } } exec("/usr/local/bin/ntop --set-admin-password=" . $ntop_config['password'] . " &", $ntopout); - $start = "/usr/local/bin/ntop -i " . $ifaces_final . " -u root -d --ipv4 -M -x 8102 -X 8192 &"; + $start = "/usr/local/bin/ntop -i {$ifaces_final} -u root -d {$alltraffic} {$mergeifs} -x 8102 -X 8192 &"; write_rcfile(array( "file" => "ntop.sh", "start" => $start, |