Commit Graph

3524 Commits

Author SHA1 Message Date
Tuomo Soini
2342c7cd9c Perl/Shorewall/Chains.pm: Fix warning with older perl 2016-03-29 09:58:33 +03:00
Tom Eastep
ad87d94e33 Small efficiency change
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-26 13:12:33 -07:00
Tom Eastep
f86abf9552 Eliminate @columnstack -- simple save the columns array on the call stack.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-22 10:49:40 -07:00
Tom Eastep
9fe1a34412 Tighten up editing of configuration options
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-21 12:03:45 -07:00
Tom Eastep
abe533b6e3 Correct the action on ingress filters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-19 13:45:33 -07:00
Tom Eastep
1c3140789c Add stab to ingress qdiscs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-19 13:25:39 -07:00
Tom Eastep
0399a346d0 Replace a silly line of code.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-19 12:05:45 -07:00
Tom Eastep
6ed3861d76 Correct Mangle Action Handling for second visit to the same action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 15:25:52 -07:00
Tom Eastep
7a18847c14 Correct handling of log level in a _DEFAULT setting.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 15:25:14 -07:00
Tom Eastep
273c89a753 Implement MARK and CONNMARK in the rules file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 11:42:58 -07:00
Tom Eastep
2bebf1c95a Make '&' and '|' work with CONNMARK
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 11:30:52 -07:00
Tom Eastep
18573037f9 More 'check -r' fixes around Docker
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 11:09:39 -07:00
Tom Eastep
818628138b Add MARK and CONNMARK to the %targets table
- Also, sort the table entries

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 10:21:35 -07:00
Tom Eastep
2adec0eb65 Implement a filename cache for find_file()
- Don't need to search the CONFIG_PATH for re-open of same file.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 09:45:41 -07:00
Tom Eastep
6ae94767b7 Correct a comment
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-18 08:31:52 -07:00
Tom Eastep
9ab2310dc8 Correct an incorrect comment in process_rules()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-17 08:47:33 -07:00
Tom Eastep
da0653cb2f Declare passed() in Shorewall::User rather than importing it from Config
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-15 14:16:15 -07:00
Tom Eastep
65ce6ed226 Update modules to use passed() for parameter testing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-15 12:06:32 -07:00
Tom Eastep
eb9dd3e485 Implement passed() in Config.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-15 12:00:56 -07:00
Tom Eastep
796f191d48 Don't re-stat action files in process_action()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-15 09:03:36 -07:00
Tom Eastep
71c26beab4 Remove dead code (caused by bad test)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 17:56:34 -07:00
Tom Eastep
6f04902963 Make use of 'state=' in actions a fatal error
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 17:55:54 -07:00
Tom Eastep
901c6d34f6 Correct typo in Rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 15:56:57 -07:00
Tom Eastep
741da14789 Ignore 'state' in the actions file with a warning
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 15:46:29 -07:00
Tom Eastep
dd547c90a8 Implement the 'state' action option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 14:30:36 -07:00
Tom Eastep
35fac8c2ea Avoid repeated %actions lookup in process_action()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 12:37:45 -07:00
Tom Eastep
513b828788 Pass '$prerule' to process_inline()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 10:56:07 -07:00
Tom Eastep
28e0cb5335 Use filename stored in the actions table
- Avoid a find_file call on each action invocation

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 10:55:39 -07:00
Tom Eastep
c631173310 Eliminate the %inlines table
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-14 10:47:18 -07:00
Tom Eastep
2c14b7c9e3 Rename %actparms to %actparams
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 15:36:38 -07:00
Tom Eastep
8e7af2e95e Additional editing of audit action parameters.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 15:28:49 -07:00
Tom Eastep
44c0bffcd3 Add 'audit' option to actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 14:39:46 -07:00
Tom Eastep
2c3644a510 Make Action/Inline binary options into a bitmap
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 14:15:43 -07:00
Tom Eastep
407bc8f8db More prerule fixes in expand_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 12:57:23 -07:00
Tom Eastep
2743a411ae Add a jump to DOCKER from OUTPUT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 12:51:36 -07:00
Tom Eastep
c2fd48c4c6 Include pre-rule matches when the target is a chain
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-13 10:08:17 -07:00
Tom Eastep
5f01bc75bd Better fix for $current_param in the INLINE block of process_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 18:28:27 -08:00
Tom Eastep
0e59b82503 Handle '+' in inline matches the mangle and masq files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 17:14:15 -08:00
Tom Eastep
90ace544eb Implement '+' to specify inline matches as "early"
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 16:39:46 -08:00
Tom Eastep
c36cee28fb Save/Restore $current_param in process_inline()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 16:39:08 -08:00
Tom Eastep
ec2ebee0e6 Clear inline matches between calls to process_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 15:08:47 -08:00
Tom Eastep
a50c52675b Correct a comment
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 15:08:04 -08:00
Tom Eastep
bb7b3123df Eliminate ?begin perl ... ?end Perl in many actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 12:15:07 -08:00
Tom Eastep
3960fa6e0e Performance tweak to read_a_line()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 09:05:30 -08:00
Tom Eastep
a7fda02d88 Print lines copied into the generated script when tracing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-11 15:59:49 -08:00
Tom Eastep
68a324c62c Small tweaks to read_a_line()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-11 13:56:03 -08:00
Tom Eastep
6779c8307f Optimize chain resolution in process_mangle_rule1()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-10 15:26:52 -08:00
Tom Eastep
147c7e284f Fix a couple of Mangle Action blunders
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-10 13:59:29 -08:00
Tom Eastep
8d657775af Fix 'check -r'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-10 13:41:59 -08:00
Tom Eastep
b14bf0e779 Remove unused globals from the Rules module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-10 11:14:51 -08:00