diff options
author | laforge <laforge> | 2001-05-12 05:22:18 +0000 |
---|---|---|
committer | laforge <laforge> | 2001-05-12 05:22:18 +0000 |
commit | 55ee5973f89d25a3e77ba2f3175b7a74c643c807 (patch) | |
tree | ae317b4d2cb635ddb900f1bab96af94e2d185729 /extensions | |
parent | 46c457e5e45c47019030534732906527d545d686 (diff) |
fixed bug in save() function causing it to print '--reject-with reject-with' in all cases
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/libipt_REJECT.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c index 84b0b91..1afdfc5 100644 --- a/extensions/libipt_REJECT.c +++ b/extensions/libipt_REJECT.c @@ -146,8 +146,13 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target) { const struct ipt_reject_info *reject = (const struct ipt_reject_info *)target->data; + unsigned int i; + + for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++) + if (reject_table[i].with == reject->with) + break; - printf("--reject-with %s ", reject_table[reject->with].name); + printf("--reject-with %s ", reject_table[i].name); } struct iptables_target reject |