diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-06 02:00:32 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-03-06 02:00:32 +0000 |
commit | 191e3ffccbea68fa927720a8ef8f8b0a437c1f41 (patch) | |
tree | 89d3ff3d46f53d27e3a4905d99e2bf443d2274e9 /extensions/libipt_NFLOG.c | |
parent | ae4b0b3aa70c67f2eff303a3e75834e45c3794a7 (diff) |
Fix cut and paste error breaking use of groups != 0
Diffstat (limited to 'extensions/libipt_NFLOG.c')
-rw-r--r-- | extensions/libipt_NFLOG.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/extensions/libipt_NFLOG.c b/extensions/libipt_NFLOG.c index 4a2c1970..ae5c62a5 100644 --- a/extensions/libipt_NFLOG.c +++ b/extensions/libipt_NFLOG.c @@ -35,7 +35,7 @@ static void init(struct xt_entry_target *t, unsigned int *nfcache) { struct xt_nflog_info *info = (struct xt_nflog_info *)t->data; - info->group = XT_NFLOG_DEFAULT_GROUP; + info->group = 0; info->threshold = XT_NFLOG_DEFAULT_THRESHOLD; } @@ -56,10 +56,10 @@ static int parse(int c, char **argv, int invert, unsigned int *flags, "Unexpected `!' after --nflog-group"); n = atoi(optarg); - if (n < 1 || n > 32) + if (n < 0) exit_error(PARAMETER_PROBLEM, - "--nflog-group has to be between 1 and 32"); - info->group = 1 << (n - 1); + "--nflog-group can not be negative"); + info->group = n; break; case NFLOG_PREFIX: if (*flags & NFLOG_PREFIX) @@ -118,8 +118,8 @@ static void nflog_print(const struct xt_nflog_info *info, char *prefix) { if (info->prefix[0] != '\0') printf("%snflog-prefix \"%s\" ", prefix, info->prefix); - if (info->group != XT_NFLOG_DEFAULT_GROUP) - printf("%snflog-group %u ", prefix, ffs(info->group)); + if (info->group) + printf("%snflog-group %u ", prefix, info->group); if (info->len) printf("%snflog-range %u ", prefix, info->len); if (info->threshold != XT_NFLOG_DEFAULT_THRESHOLD) |