Allow IGMP Proxy logging verbosity to be selected via system log settings (PR 2901)

This commit is contained in:
Stephen Beaver 2016-06-22 10:49:15 -04:00
parent dbab5a7ea8
commit 2bd0585e30
2 changed files with 17 additions and 1 deletions

View File

@ -1634,7 +1634,12 @@ EOD;
fclose($igmpfl);
unset($igmpconf);
mwexec_bg("/usr/local/sbin/igmpproxy -v {$g['tmp_path']}/igmpproxy.conf");
if (isset($config['syslog']['igmpxverbose'])) {
mwexec_bg("/usr/local/sbin/igmpproxy -v {$g['tmp_path']}/igmpproxy.conf");
} else {
mwexec_bg("/usr/local/sbin/igmpproxy {$g['tmp_path']}/igmpproxy.conf");
}
log_error(gettext("Started IGMP proxy service."));
return 0;

View File

@ -94,6 +94,7 @@ $pconfig['rawfilter'] = isset($config['syslog']['rawfilter']);
$pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions'];
$pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']);
$pconfig['logfilesize'] = $config['syslog']['logfilesize'];
$pconfig['igmpxverbose'] = isset($config['syslog']['igmpxverbose']);
if (!$pconfig['nentries']) {
$pconfig['nentries'] = 50;
@ -170,11 +171,14 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
$config['syslog']['nologprivatenets'] = $_POST['logprivatenets'] ? false : true;
$config['syslog']['nolognginx'] = $_POST['lognginx'] ? false : true;
$config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false;
$config['syslog']['igmpxverbose'] = $_POST['igmpxverbose'] ? true : false;
if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0) {
$config['syslog']['filterdescriptions'] = $_POST['filterdescriptions'];
} else {
unset($config['syslog']['filterdescriptions']);
}
if ($config['syslog']['enable'] == false) {
unset($config['syslog']['remoteserver']);
unset($config['syslog']['remoteserver2']);
@ -312,6 +316,13 @@ $section->addInput(new Form_Checkbox(
$pconfig['rawfilter']
))->setHelp(gettext('If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information, but it is more difficult to read.'));
$section->addINput(new Form_Checkbox(
'igmpxverbose',
'IGMP Proxy',
'Enable verbose logging (Default is terse logging)',
$pconfig['igmpxverbose']
));
$section->addInput(new Form_Select(
'filterdescriptions',
'Where to show rule descriptions',