Tom Eastep
de4e0898b5
Catch protocol lists in contexts that don't allow them.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-06 17:23:14 -08:00
Tom Eastep
edc0a84e5d
Optimize RELATED rules.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-06 16:48:37 -08:00
Tom Eastep
d4c9885c09
Change interpretation of the log tag when LOGTAGONLY=Yes
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-06 13:10:18 -08:00
Tom Eastep
c41b9e596d
Don't add --cstate to dropInvalid rule.
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-06 09:42:55 -08:00
Tom Eastep
9fd7933b5d
Make inline actions work in sections other than NEW.
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-06 09:32:50 -08:00
Tom Eastep
f223e3584c
Make '+' optional in the ADD and DEL statements.
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-06 07:37:11 -08:00
Tom Eastep
3f24416f37
Add a warning for opcode inversion when not arptables_jf.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-05 13:14:32 -08:00
Tom Eastep
38aa7f3857
Correct opcode inversion when not ARPTABLES_JF
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-05 08:26:46 -08:00
Tom Eastep
7f6430a383
Correct address inversion in match_arp_net()
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-05 08:20:51 -08:00
Tom Eastep
4fc0dba26d
Correct two-interface check in process_arprule.
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-05 08:17:53 -08:00
Tom Eastep
0c7e10dbfa
Add a comment to the Zones file
...
- define the {bridge} member.
2013-01-05 08:15:56 -08:00
Tom Eastep
97009bad79
Correct arptables_jf MAC handling.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-04 17:27:16 -08:00
Tom Eastep
af7b7195d2
Fix MAC handling in the ARP module
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-04 15:55:52 -08:00
Tom Eastep
a732f6e538
Add some comments to the ARP module
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2013-01-04 15:07:51 -08:00
Tom Eastep
38657d9f98
Support for arptables.
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-04 09:17:57 -08:00
Tom Eastep
90e0c8b717
Don't update mtime on shorewall.conf during update that doesn't change the file
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-02 15:03:07 -08:00
Tom Eastep
aca3ce3c21
Delete blank line
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2013-01-01 08:29:02 -08:00
Tom Eastep
34f8125416
Correct a couple of issues with update -D
...
- shorewall.conf.bak is no longer unlinked
- The mtime of all unaltered files is no longer updated
2012-12-31 12:43:02 -08:00
Tom Eastep
87715e5f0b
Correct Typo
...
Signed-off-by: Tom Eastep <teastep@mint14.(none)>
2012-12-31 10:36:27 -08:00
Tom Eastep
5848d7cab7
Correct helper validation
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-30 13:20:56 -08:00
Tom Eastep
5dfc27355e
Correct a comment
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-29 11:34:12 -08:00
Tom Eastep
6d9cca1cff
fq_codel
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-29 10:58:11 -08:00
Tom Eastep
51deec115b
Correct handling of wildcard interfaces
...
- chain_base[1] renamed var_base[1]
- $chain replaced by $var in renamed functions
- replace trailing '+' by '_plus' to provide uniqueness
- add sub chain_base() to the Chains module as an identity mapper
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-28 10:39:19 -08:00
Tom Eastep
643f419264
Merge branch '4.5.11'
...
Conflicts:
Shorewall/Perl/Shorewall/Rules.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-28 09:02:33 -08:00
Tom Eastep
2009a66bb5
Avoid invalid function name for starting an optional interface
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-28 08:04:06 -08:00
Tom Eastep
ebe4267c49
Rename IGNOREOLDCAPVERSIONS to WARNOLDCAPVERSION
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-27 09:58:45 -08:00
Tom Eastep
8b92a59821
Ignore '-m comment' when detecting duplicate rules
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-27 09:51:33 -08:00
Tom Eastep
ef0102e9f1
Add the 'IGNOREOLDCAPS' option
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-26 15:48:08 -08:00
Tom Eastep
14bbda14a2
Add some comments describing Config.pm globals
...
- Also changed $shell from 'my' to 'our'.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-26 10:55:13 -08:00
Tom Eastep
bfeea76cf2
Disallow ?FORMAT when $max_format == 1
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
Conflicts:
Shorewall/Perl/Shorewall/Config.pm
2012-12-26 07:37:23 -08:00
Tom Eastep
100e03cf93
Don't set $nocomment in in-line action
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-26 07:06:29 -08:00
Tom Eastep
84cc78c58e
Eliminate @comments
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-25 17:00:24 -08:00
Tom Eastep
3f28af80d2
Disallow ?FORMAT when $max_format == 1
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-25 08:10:48 -08:00
Tom Eastep
6126ae67e6
Don't apply AUTOCOMMENT or comment continuation to inline actions.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 13:50:26 -08:00
Tom Eastep
575020c851
More comment handling
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 13:35:42 -08:00
Tom Eastep
1c212e878f
Restore SECTION handling in Accounting File
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 13:33:44 -08:00
Tom Eastep
4393a6c603
Eliminate redundant calls to clear_comment.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 12:35:08 -08:00
Tom Eastep
fca5b75c5b
Merge branch '4.5.11'
2012-12-24 10:30:43 -08:00
Tom Eastep
c942a95d3c
Allow ?COMMENT in accounting.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 10:15:23 -08:00
Tom Eastep
89ea37e088
Correct nested comments.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 10:11:53 -08:00
Tom Eastep
14f8947012
Remove old COMMENT/FORMAT handling
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-24 09:31:20 -08:00
Tom Eastep
15817078b8
Use 'our' for globals to aid debugging.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-23 13:16:54 -08:00
Tom Eastep
0acd93a032
Ensure that action and macro files always allow comment directives.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-23 12:19:30 -08:00
Tom Eastep
4d2379f542
Implement update -D
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-23 10:50:31 -08:00
Tom Eastep
c9eccaf3b8
Implement ?COMMENT directive
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-23 10:49:32 -08:00
Tom Eastep
44a4f6d77d
Move COMMENT handling to the Config module.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-22 13:51:24 -08:00
Tom Eastep
e4e61c4193
A more uniform way of handling $max_format
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-22 11:57:25 -08:00
Tom Eastep
0cd0675c98
Always push $file_format and $max_format onto the include stack.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-22 08:15:46 -08:00
Tom Eastep
bc230c00a3
Optimizations in process_compiler_directive()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-22 08:14:46 -08:00
Tom Eastep
10108b2d6a
Convert file processors to use ?FORMAT
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-21 15:49:28 -08:00
Tom Eastep
35aeaf340f
Implement ?FORMAT directive
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-21 15:31:42 -08:00
Tom Eastep
0eb041d2d1
Correct ?SET error message
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-21 15:23:26 -08:00
Tom Eastep
a5debe793f
Add $file_format exported variable and handle in the include stack.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-21 15:14:23 -08:00
Tom Eastep
df7785f2e9
Implement user-defined address variables.
...
- Also correct handling of ${0} & ${chain} in a SWITCH column.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-18 17:58:20 -08:00
Tom Eastep
2869a9a94d
Rename add_quotes to join_parts
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-15 16:12:03 -08:00
Tom Eastep
b6e699ca5c
Factor some common code into a function.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-13 06:46:57 -08:00
Tom Eastep
743478614b
Make @0 work correctly again.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-12 13:13:17 -08:00
Tom Eastep
5944b4fc7b
Make @chain (@{chain}) a synonym for @0 (@{0})
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-12 11:55:04 -08:00
Tom Eastep
8a0abab4cc
Rename 'ALLOWUNKNOWNVARIABLES' to 'IGNOREUNKNOWNVARIABLES'
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-12 11:51:31 -08:00
Tom Eastep
5da7db3d5f
Implement @-variables.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-12 11:46:38 -08:00
Tom Eastep
14cdaf21fc
Handle nested params in push_action_params()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-09 10:45:29 -08:00
Tom Eastep
88d4814209
Merge branch '4.5.10'
...
Conflicts:
Shorewall/Perl/Shorewall/Config.pm
2012-12-08 20:54:33 -08:00
Tom Eastep
6ab5cfd63a
Use split_list2 in isolate_basic_target()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-06 19:12:44 -08:00
Tom Eastep
7190cd1265
Handle nested parens when pushing action parameters.
...
- Add an optional argument to split_list1 that causes parens to be retained.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
Conflicts:
Shorewall/Perl/Shorewall/Config.pm
2012-12-06 15:20:10 -08:00
Tom Eastep
5f48e4e531
Handle nested parens when pushing action parameters.
...
- Add an optional argument to split_list1 that causes parens to be retained.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-06 15:13:14 -08:00
Tom Eastep
fdadb57e82
Minor readability improvement
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 19:41:18 -08:00
Tom Eastep
8139f2ad91
Rename process_conditional() to process_compiler_directive()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 14:53:03 -08:00
Tom Eastep
189cd59650
Improve expression evaluation
...
- Only quote values when there is not an odd number of preceding quotes
- Make address family test return a numeric value
- Unconditionally trace the generated expression if debugging is set.
- Convert an empty expression into '' rather than generate an error.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 08:37:50 -08:00
Tom Eastep
4ec47783f1
Detect missing target in merge_levels()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 07:52:07 -08:00
Tom Eastep
2875fbb521
Cosmetic change (add a blank line).
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 07:51:41 -08:00
Tom Eastep
25c53f5a60
Detect missing target in merge_levels()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 07:51:21 -08:00
Tom Eastep
c61c9ba7eb
Make expression evaluation more deterministic.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 18:10:19 -08:00
Tom Eastep
2fbbc70e83
Only do SET and RESET when we aren't omitting.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 16:27:18 -08:00
Tom Eastep
c18996b6f5
Implement ?set and ?reset directives
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 14:28:03 -08:00
Tom Eastep
fb2d876683
Rename $loglevel and $logtag to $_loglevel and $_logtag respectively.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 08:49:59 -08:00
Tom Eastep
a25b3c68ee
Rename %symbols to %variables
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 08:49:25 -08:00
Tom Eastep
314632f1f4
Unified symbol table for shell variables.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-03 17:18:21 -08:00
Tom Eastep
409f5f2aab
Expand variables from the shorewallrc1 then shorewallrc hashes
2012-12-03 15:33:33 -08:00
Tom Eastep
fb0035bdf3
Add ALLOWUNKNOWNVARIABLES option.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-03 14:43:35 -08:00
Tom Eastep
72aabef0fa
Add $logaction and $logtag as variables usable within actions
...
- Also make action variables usable in ?if and ?elsif expressions.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-03 12:31:47 -08:00
Tom Eastep
fc3606a489
Prepare for multiple options in actions files
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-03 08:17:55 -08:00
Tom Eastep
ad4709cb6d
Small effeciency improvement
...
- Don't check for 'bad match' until it is known that the matches are the same.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-03 06:54:44 -08:00
Tom Eastep
c0abdc1fe8
Add some comments in and around delete_duplicates()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-02 17:31:13 -08:00
Tom Eastep
cd5e9be467
Carefully suppress duplicate rules in all tables
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-02 12:20:24 -08:00
Tom Eastep
c05c928c6c
Delete adjacent duplicate rules in tables other than 'raw'
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-02 09:21:04 -08:00
Tom Eastep
a33cf5cc91
Fix AUTOCOMMENT=No
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-02 08:26:54 -08:00
Tom Eastep
65676cb865
Support passing log levels inside parameters.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 15:06:51 -08:00
Tom Eastep
8ebbdee20f
Only look for numerics if a shell variable begins with a number.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 12:52:26 -08:00
Tom Eastep
6c1a5b8051
Be more agressive about detecting action recursion.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 12:10:06 -08:00
Tom Eastep
b9adc2ebec
Remove another vestage of CONDITION_INIT
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 09:33:01 -08:00
Tom Eastep
44f00cd0aa
Restore original $actionfile logic in process_actions()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 08:09:20 -08:00
Tom Eastep
ae5680401f
Remove questionable autocreate of an action in createlogactionchain()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 08:04:29 -08:00
Tom Eastep
8cbe26e32c
Ignore 'inline' for certain actions.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-01 07:54:42 -08:00
Tom Eastep
146402d9be
Yet another correction to the same line :-(
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-30 09:55:24 -08:00
Tom Eastep
70f26d8bb2
Correct line in prior commit.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-30 09:30:27 -08:00
Tom Eastep
893d054cb8
Reduce the block levels in define_firewall()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-30 08:46:49 -08:00
Tom Eastep
53fd0e7c8c
Don't require functions called from Shorewall::Compiler::compiler to know the current indentation.
...
Also, add an optional 'times' parameter to push_indent() and pop_indent().
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-30 07:49:42 -08:00
Tom Eastep
6702bb1989
Revert condition initialization patch.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-30 07:31:29 -08:00
Tom Eastep
e60369728a
Only initialize switches that survived optimization
...
- Also use push_indent to make things more readable
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-29 15:25:28 -08:00
Tom Eastep
7d4bc568d8
Include initialization in condition match if supported
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-11-29 14:54:09 -08:00