diff options
author | laforge <laforge> | 2000-10-30 12:00:27 +0000 |
---|---|---|
committer | laforge <laforge> | 2000-10-30 12:00:27 +0000 |
commit | 2346f9f16cf667749a79c19affdd78723ac98150 (patch) | |
tree | cefa2cb46fbf601728ba8026d50ca16c09be5539 /libiptc/libiptc.c | |
parent | 47af0094dc0d481a5dd96f162be980cce6c9f65d (diff) |
two libiptc bugs fixed, including the 'segv while doing more than one
action per commit' one.
Diffstat (limited to 'libiptc/libiptc.c')
-rw-r--r-- | libiptc/libiptc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index a0f12e6..15682cb 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -1,4 +1,4 @@ -/* Library which manipulates firewall rules. Version 0.1. */ +/* Library which manipulates firewall rules. Version $Revision$ */ /* Architecture of firewall rules is as follows: * @@ -731,7 +731,7 @@ insert_rules(unsigned int num_rules, unsigned int rules_size, newh = alloc_handle((*handle)->info.name, (*handle)->entries.size + rules_size, - (*handle)->info.num_entries + num_rules); + (*handle)->new_number + num_rules); if (!newh) return 0; newh->info = newinfo; @@ -1355,11 +1355,12 @@ int TC_RENAME_CHAIN(const IPT_CHAINLABEL oldname, iptc_fn = TC_RENAME_CHAIN; - /* find_label doesn't cover built-in targets: DROP, ACCEPT - RETURN. */ + /* find_label doesn't cover built-in targets: DROP, ACCEPT, + QUEUE, RETURN. */ if (find_label(newname, *handle) || strcmp(newname, LABEL_DROP) == 0 || strcmp(newname, LABEL_ACCEPT) == 0 + || strcmp(newname, LABEL_QUEUE) == 0 || strcmp(newname, LABEL_RETURN) == 0) { errno = EEXIST; return 0; |