summaryrefslogtreecommitdiffstats
path: root/libiptc/libiptc.c
diff options
context:
space:
mode:
authorgandalf <gandalf>2004-09-22 21:31:09 +0000
committergandalf <gandalf>2004-09-22 21:31:09 +0000
commitb2c6d9701263448efbf1ebab45f2cb4062df16b2 (patch)
tree99e652d2ac04f76a3b595438c291229956bf256f /libiptc/libiptc.c
parent5e923e305876af331e5fc3c2884079f54b97da83 (diff)
Fix two more rulenumber off by 1 errors
Diffstat (limited to 'libiptc/libiptc.c')
-rw-r--r--libiptc/libiptc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c
index a71ecad..3436da9 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;
}