All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wilson Padovani Júnior" <admin@netmogi.com.br>
To: netfilter-devel@lists.netfilter.org
Subject: Re: Problem using REDIRECT and SO_ORIGINAL_DST
Date: Thu, 07 Nov 2002 17:49:26 GMT	[thread overview]
Message-ID: <20021107.17492673@mis.configured.host> (raw)

Balazs Scheidler wrote:
>
> inet_ntoa() uses a static buffer to format its result, you are calling
> inet_ntoa three times which all work on the same buffer -> the result of 
the
> last invocation will be used three times.
>
> try writing 3 printf() statements, or copy the result of inet_ntoa() 
to a
> private buffer, or create your own inet_ntoa() function.
>
> --
> Bazsi
> PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E 
C82C 8EB1

Thanks Bazsi.

    I changed the code to use 3 printf() statements, as you said, and 
it worked. I was expecting an error on my program, but not something 
stupid like that!!

Wilson.

             reply	other threads:[~2002-11-07 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07 17:49 Wilson Padovani Júnior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-06 15:22 Problem using REDIRECT and SO_ORIGINAL_DST Wilson Padovani Júnior
2002-11-06 19:06 ` Balazs Scheidler

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=20021107.17492673@mis.configured.host \
    --to=admin@netmogi.com.br \
    --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.