From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wilson Padovani =?ISO-8859-1?Q?J=FAnior?= Subject: Re: Problem using REDIRECT and SO_ORIGINAL_DST Date: Thu, 07 Nov 2002 17:49:26 GMT Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <20021107.17492673@mis.configured.host> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: To: netfilter-devel@lists.netfilter.org Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org 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=20 the > last invocation will be used three times. > > try writing 3 printf() statements, or copy the result of inet_ntoa()=20= to a > private buffer, or create your own inet_ntoa() function. > > -- > Bazsi > PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E=20= C82C 8EB1 Thanks Bazsi. I changed the code to use 3 printf() statements, as you said, and=20= it worked. I was expecting an error on my program, but not something=20= stupid like that!! Wilson.