--- system.inc.old      2009-12-22 20:32:06.000000000 +0000
+++ system.inc  2009-12-22 21:23:35.000000000 +0000
@@ -412,6 +412,8 @@
                $log_create_directive = $clog_create;
        }
 
+       $filterstr = str_pad("{$syslogcfg['filterfacility']}.*", 10);
+
        if (isset($syslogcfg)) {
                $separatelogfacilities = array('ntpd','racoon','openvpn');
                if($config['installedpackages']['package']) {
@@ -466,7 +468,7 @@
                $syslogconf .= "!-{$facilitylist}\n";
                if (!isset($syslogcfg['disablelocallogging'])) 
                        $syslogconf .= <<<EOD
-local0.* {$log_directive}{$g['varlog_path']}/filter.log
+{$filterstr} {$log_directive}{$g['varlog_path']}/filter.log
 local3.* {$log_directive}{$g['varlog_path']}/vpn.log
 local4.* {$log_directive}{$g['varlog_path']}/portalauth.log
 local7.* {$log_directive}{$g['varlog_path']}/dhcpd.log

--- util.inc.old        2009-12-22 19:52:08.000000000 +0000
+++ util.inc    2009-12-22 19:59:37.000000000 +0000
@@ -284,6 +284,16 @@
        return true;
 }
 
+/* returns true if $name is a valid syslog facility */
+/* returns false otherwise */
+
+function is_validsyslogfacility($name) {
+       if (in_array($name, array("auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7")))
+               return true;
+       else
+               return false;
+}
+
 /* returns true if $name is a valid name for an alias */
 /* returns NULL if a reserved word is used */
 function is_validaliasname($name) {

--- diag_logs_settings.php.old  2009-12-22 19:32:45.000000000 +0000
+++ diag_logs_settings.php      2009-12-22 20:53:43.000000000 +0000
@@ -49,6 +49,7 @@
 
 $pconfig['reverse'] = isset($config['syslog']['reverse']);
 $pconfig['nentries'] = $config['syslog']['nentries'];
+$pconfig['filterfacility'] = $config['syslog']['filterfacility'];
 $pconfig['remoteserver'] = $config['syslog']['remoteserver'];
 $pconfig['remoteserver2'] = $config['syslog']['remoteserver2'];
 $pconfig['remoteserver3'] = $config['syslog']['remoteserver3'];
@@ -66,6 +67,9 @@
 if (!$pconfig['nentries'])
        $pconfig['nentries'] = 50;
 
+if (!$pconfig['filterfacility'])
+       $pconfig['filterfacility'] = "local0";
+
 if ($_POST) {
 
        unset($input_errors);
@@ -89,9 +93,14 @@
                $input_errors[] = "Number of log entries to show must be between 5 and 2000.";
        }
 
+       if (!is_validsyslogfacility($_POST['filterfacility'])) {
+               $input_errors[] = "Invalid syslog facility.";
+       }
+
        if (!$input_errors) {
                $config['syslog']['reverse'] = $_POST['reverse'] ? true : false;
                $config['syslog']['nentries'] = (int)$_POST['nentries'];
+               $config['syslog']['filterfacility'] = $_POST['filterfacility'];
                $config['syslog']['remoteserver'] = $_POST['remoteserver'];
                $config['syslog']['remoteserver2'] = $_POST['remoteserver2'];
                $config['syslog']['remoteserver3'] = $_POST['remoteserver3'];
@@ -197,6 +206,11 @@
                           <input name="nentries" id="nentries" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['nentries']);?>"></td>
                       </tr>
                       <tr>
+                        <td width="22%" valign="top" class="vtable">&nbsp;</td>
+                        <td width="78%" class="vtable">Filter syslog facility:
+                          <input name="filterfacility" id="filterfacility" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['filterfacility']);?>"></td>
+                      </tr>
+                      <tr>
                         <td valign="top" class="vtable">&nbsp;</td>
                         <td class="vtable"> <input name="logdefaultblock" type="checkbox" id="logdefaultblock" value="yes" <?php if ($pconfig['logdefaultblock']) echo "checked"; ?>>
                           <strong>Log packets blocked by the default rule</strong><br>