All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Thomas Woerner <twoerner@redhat.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] cleanup
Date: Fri, 10 Sep 2004 13:08:45 +0200	[thread overview]
Message-ID: <41418B3D.3030808@trash.net> (raw)
In-Reply-To: <414076C7.7000009@redhat.com>

Thomas Woerner wrote:
> 
> Hello,
> 
> 
> I got this patch for iptables in bugzilla #131848 from Steve Grubb. Are 
> including it in the next version?

This doesn't look like cleanup and I'm not going to dig
up bugreports from redhat bugzilla. What is this patch
supposed to fix ?

Regards
Patrick

> 
> 
> Thanks in advance,
> Thomas
> 
> 
> ------------------------------------------------------------------------
> 
> 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;
>  		}
>  	}
>  

  reply	other threads:[~2004-09-10 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09 15:29 [PATCH] cleanup Thomas Woerner
2004-09-10 11:08 ` Patrick McHardy [this message]
  -- 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=41418B3D.3030808@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=twoerner@redhat.com \
    /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.