From 88244dc132808ad19ce1e5322b472dbfd7e67780 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 7 Feb 2011 17:12:43 -0800 Subject: [PATCH] Don't allow MAC addresses in the accounting file --- Shorewall/Perl/Shorewall/Accounting.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Accounting.pm b/Shorewall/Perl/Shorewall/Accounting.pm index 23ec1bf0b..8075c37c3 100644 --- a/Shorewall/Perl/Shorewall/Accounting.pm +++ b/Shorewall/Perl/Shorewall/Accounting.pm @@ -149,7 +149,11 @@ sub process_accounting_rule( ) { my $restriction = NO_RESTRICT; - $source = ALLIP if $source eq 'any' || $source eq 'all'; + if ( $source eq 'any' || $source eq 'all' ) { + $source = ALLIP; + } else { + fatal_error "MAC addresses are not allowed in the accounting file" if $source =~ /~/; + } if ( have_bridges ) { my $fw = firewall_zone;