diff options
author | Martin Josefsson <gandalf@wlug.westbo.se> | 2004-09-22 21:31:09 +0000 |
---|---|---|
committer | Martin Josefsson <gandalf@wlug.westbo.se> | 2004-09-22 21:31:09 +0000 |
commit | 8e795b0ad07174eed4172f8d7237b3abdd9d0e15 (patch) | |
tree | 99e652d2ac04f76a3b595438c291229956bf256f /libiptc | |
parent | eb066cc4fb75a616400eaf38dfa31c052c76cf5c (diff) |
Fix two more rulenumber off by 1 errors
Diffstat (limited to 'libiptc')
-rw-r--r-- | libiptc/libiptc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index a71ecad1..3436da9e 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -1,4 +1,4 @@ -/* Library which manipulates firewall rules. Version $Revision: 1.52 $ */ +/* Library which manipulates firewall rules. Version $Revision: 1.53 $ */ /* Architecture of firewall rules is as follows: * @@ -1308,7 +1308,7 @@ TC_REPLACE_ENTRY(const IPT_CHAINLABEL chain, return 0; } - if (!(old = iptcc_get_rule_num(c, rulenum))) { + if (!(old = iptcc_get_rule_num(c, rulenum + 1))) { errno = E2BIG; return 0; } @@ -1495,7 +1495,7 @@ TC_DELETE_NUM_ENTRY(const IPT_CHAINLABEL chain, return 0; } - if (!(r = iptcc_get_rule_num(c, rulenum))) { + if (!(r = iptcc_get_rule_num(c, rulenum + 1))) { errno = E2BIG; return 0; } |