Commit Graph

12560 Commits

Author SHA1 Message Date
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
2b9af94c59 Clean up the Embedded Perl section in the Actions documentation.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-17 15:59:52 -08:00
Tom Eastep
e8720e9f78 Add a section Id to the Shorewall Variables section
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-16 09:48:33 -08:00
Tom Eastep
6b758fd588 Describe use of BEGIN PERL .... END PERL in action bodies.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-16 09:06:29 -08:00
Tom Eastep
1dc0f8b170 Split the Shell Variables section into multiple sections.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-16 08:45:46 -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
3fbe3aad09 Merge branch '4.5.10' 2012-12-14 06:34:45 -08:00
Tom Eastep
7c6fcfccd5 Fix typo on line 21 on the conntrack file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-14 06:33:54 -08:00
Tom Eastep
1cbeaa6a9f Apply Tuomo Soini's tabs patches for the rules files.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-13 09:26:09 -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
10237e01b2 Document ?set and ?reset
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-09 11:46:51 -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
4d064d6713 Replace spaces with tabs in rules files.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-07 16:48:55 -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
61d67a4741 Remove extraneous comment from the rule generated by action.RST
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-06 15:13:46 -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
0a31d9ba41 Remove extraneous comment from the rule generated by action.RST
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-06 15:10:53 -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
56d7b6248b Begin Action Documentaiton Update
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-05 19:07:42 -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
02cbd72a91 Merge branch '4.5.10' 2012-12-04 10:56:09 -08:00
Tom Eastep
60012d1208 Add additional space for the OPTIONS column
- actions and actions.std problem

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 10:54:32 -08:00
Tom Eastep
a7b8b53f72 Small change to the Actions document.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 10:40:22 -08:00
Tom Eastep
22aa06f497 Small change to the Actions document.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 10:39:29 -08:00
Tom Eastep
903e25a91a Add ALLOWUNKNOWNVARIABLES to the sample configurations.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 09:04:34 -08:00
Tom Eastep
8f1e8bf475 Add 'ALLOWUNKNOWNVARIABLES' to the manpages.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2012-12-04 08:50:23 -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
d5405757dd Merge branch '4.5.10'
Conflicts:
	Shorewall/Perl/Shorewall/Chains.pm
	Shorewall/manpages/shorewall.conf.xml
	Shorewall6/manpages/shorewall6.conf.xml
2012-12-02 13:18:33 -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