[tw] forgot to add one patch
This commit is contained in:
parent
62b5948287
commit
932877e6bd
54
iptables-1.3.0-cleanup.patch
Normal file
54
iptables-1.3.0-cleanup.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
--- iptables-1.3.0/extensions/libipt_rpc.c.cleanup 2005-03-18 16:25:34.174370567 +0100
|
||||||
|
+++ iptables-1.3.0/extensions/libipt_rpc.c 2005-03-18 16:25:32.000000000 +0100
|
||||||
|
@@ -252,7 +252,7 @@
|
||||||
|
|
||||||
|
idup = 0;
|
||||||
|
memset(buf, 0, sizeof(buf));
|
||||||
|
- dst = (char *)buf - 1;
|
||||||
|
+ dst = (char *)buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- iptables-1.3.0/extensions/libipt_REJECT.c.cleanup 2005-03-18 16:29:21.611549462 +0100
|
||||||
|
+++ iptables-1.3.0/extensions/libipt_REJECT.c 2005-03-18 16:31:26.951045260 +0100
|
||||||
|
@@ -147,13 +147,16 @@
|
||||||
|
{
|
||||||
|
const struct ipt_reject_info *reject
|
||||||
|
= (const struct ipt_reject_info *)target->data;
|
||||||
|
- unsigned int i;
|
||||||
|
+ unsigned int i, limit=sizeof(reject_table)/sizeof(struct reject_names);
|
||||||
|
|
||||||
|
- for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++) {
|
||||||
|
+ for (i = 0; i < limit; i++) {
|
||||||
|
if (reject_table[i].with == reject->with)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- printf("reject-with %s ", reject_table[i].name);
|
||||||
|
+ if (i < limit)
|
||||||
|
+ printf("reject-with %s ", reject_table[i].name);
|
||||||
|
+ else
|
||||||
|
+ fprintf(stderr, "reject-with: error reject->with not found ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Saves ipt_reject in parsable form to stdout. */
|
||||||
|
@@ -161,13 +164,16 @@
|
||||||
|
{
|
||||||
|
const struct ipt_reject_info *reject
|
||||||
|
= (const struct ipt_reject_info *)target->data;
|
||||||
|
- unsigned int i;
|
||||||
|
+ unsigned int i, limit=sizeof(reject_table)/sizeof(struct reject_names);
|
||||||
|
|
||||||
|
- for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++)
|
||||||
|
+ for (i = 0; i < limit; i++) {
|
||||||
|
if (reject_table[i].with == reject->with)
|
||||||
|
break;
|
||||||
|
-
|
||||||
|
- printf("--reject-with %s ", reject_table[i].name);
|
||||||
|
+ }
|
||||||
|
+ if (i < limit)
|
||||||
|
+ printf("--reject-with %s ", reject_table[i].name);
|
||||||
|
+ else
|
||||||
|
+ fprintf(stderr, "--reject-with error reject->with not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct iptables_target reject = {
|
Loading…
Reference in New Issue
Block a user