summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_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/libip6t_policy.c
parent37b7c9b6c4f33fc3d5908d1f2b742e2f023e0e0b (diff)
Fix "empty policy element" complaining in non-strict mode.
Noticed by Tom Eastep <teastep@shorewall.net>.
Diffstat (limited to 'extensions/libip6t_policy.c')
-rw-r--r--extensions/libip6t_policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/libip6t_policy.c b/extensions/libip6t_policy.c
index 7498e989..54cd5f2b 100644
--- a/extensions/libip6t_policy.c
+++ b/extensions/libip6t_policy.c
@@ -327,7 +327,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 & IP6T_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");