firewall: Add chain name to logged rules.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Mar 2014 11:38:13 +0000 (12:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Mar 2014 11:38:13 +0000 (12:38 +0100)
This helps us to debug faster where a packet has been dropped.

config/firewall/rules.pl

index 0998c1b..4bb40a4 100755 (executable)
@@ -330,7 +330,7 @@ sub buildrules {
 
                                        # Insert firewall rule.
                                        if ($LOG && !$NAT) {
-                                               run("$IPTABLES -A $chain @options @log_limit_options -j LOG");
+                                               run("$IPTABLES -A $chain @options @log_limit_options -j LOG --log-prefix '$chain '");
                                        }
                                        run("$IPTABLES -A $chain @options -j $target");
                                }