From b35f1112f49c7861bede43508512bd2c46339703 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 20 Oct 2017 09:19:50 -0700 Subject: [PATCH] Allow 'noinline' in /etc/shorewall[6]/actions to override 'inline' Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index fe81cfd14..c1819c9b8 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -2066,9 +2066,9 @@ sub process_actions() { unless ( $type & INLINE ) { $type = INLINE if $opts & INLINE_OPT; } - } - fatal_error "Conflicting OPTIONS ($options)" if ( $opts & NOINLINE_OPT && $type == INLINE ) || ( $opts & INLINE_OPT && $opts & BUILTIN_OPT ); + fatal_error "Conflicting OPTIONS ($options)" if ( $opts & NOINLINE_OPT && $type == INLINE ) || ( $opts & INLINE_OPT && $opts & BUILTIN_OPT ); + } if ( my $actiontype = $targets{$action} ) { if ( ( $actiontype & ACTION ) && ( $type == INLINE ) ) { @@ -2077,6 +2077,9 @@ sub process_actions() { next; } + delete $actions{$action}; + delete $targets{$action}; + } elsif ( ( $actiontype & INLINE ) && ( $type == ACTION ) && $opts & NOINLINE_OPT ) { delete $actions{$action}; delete $targets{$action}; } else {