summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_policy.c
diff options
context:
space:
mode:
authorNoticed by Tom Eastep <teastep@shorewall.net>2006-01-22 13:47:07 +0000
committerPatrick McHardy <kaber@trash.net>2006-01-22 13:47:07 +0000
commit3f347569c972830e5d619b1fe2a61e888c67ca03 (patch)
treefdb663fc8f5eafa372bdb9a98b2ba63a2281937b /extensions/libipt_policy.c
parent37b7c9b6c4f33fc3d5908d1f2b742e2f023e0e0b (diff)
Fix "empty policy element" complaining in non-strict mode.
Noticed by Tom Eastep <teastep@shorewall.net>.
Diffstat (limited to 'extensions/libipt_policy.c')
-rw-r--r--extensions/libipt_policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/libipt_policy.c b/extensions/libipt_policy.c
index 593bb11f..55b969d1 100644
--- a/extensions/libipt_policy.c
+++ b/extensions/libipt_policy.c
@@ -287,7 +287,8 @@ static void final_check(unsigned int flags)
for (i = 0; i < info->len; i++) {
e = &info->pol[i];
- if (!(e->match.reqid || e->match.spi || e->match.saddr ||
+ if (info->flags & IPT_POLICY_MATCH_STRICT &&
+ !(e->match.reqid || e->match.spi || e->match.saddr ||
e->match.daddr || e->match.proto || e->match.mode))
exit_error(PARAMETER_PROBLEM,
"policy match: empty policy element");