From: Thomas Woerner <twoerner@redhat.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] cleanup
Date: Thu, 09 Sep 2004 17:29:11 +0200 [thread overview]
Message-ID: <414076C7.7000009@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
Hello,
I got this patch for iptables in bugzilla #131848 from Steve Grubb. Are including it
in the next version?
Thanks in advance,
Thomas
--
Thomas Woerner
Software Engineer Phone: +49-711-96437-310
Red Hat GmbH Fax : +49-711-96437-111
Hauptstaetterstr. 58 Email: Thomas Woerner <twoerner@redhat.com>
D-70178 Stuttgart Web : http://www.redhat.de/
[-- Attachment #2: iptables-1.2.11-cleanup.patch --]
[-- Type: text/x-patch, Size: 1857 bytes --]
diff -ur iptables-1.2.11.orig/extensions/libipt_REJECT.c iptables-1.2.11/extensions/libipt_REJECT.c
--- iptables-1.2.11.orig/extensions/libipt_REJECT.c 2004-09-05 11:27:49.000000000 -0400
+++ iptables-1.2.11/extensions/libipt_REJECT.c 2004-09-05 11:28:17.000000000 -0400
@@ -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
+ printf("reject-with: error reject->with not found ");
}
/* Saves ipt_reject in parsable form to stdout. */
@@ -161,13 +164,15 @@
{
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
diff -ur iptables-1.2.11.orig/extensions/libipt_rpc.c iptables-1.2.11/extensions/libipt_rpc.c
--- iptables-1.2.11.orig/extensions/libipt_rpc.c 2004-09-05 11:27:50.000000000 -0400
+++ iptables-1.2.11/extensions/libipt_rpc.c 2004-09-05 11:41:11.000000000 -0400
@@ -252,7 +252,7 @@
idup = 0;
memset(buf, 0, sizeof(buf));
- dst = (char *)buf - 1;
+ dst = (char *)buf;
}
}
next reply other threads:[~2004-09-09 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 15:29 Thomas Woerner [this message]
2004-09-10 11:08 ` [PATCH] cleanup Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2001-07-04 1:15 Andries.Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=414076C7.7000009@redhat.com \
--to=twoerner@redhat.com \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.