Skip to contentSkip to conversation

Problem using REDIRECT and SO_ORIGINAL_DST

DISCUSSION Wilson Padovani Júnior 1 participant 1 message Nov 7, 2002 netfilter

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines · Balazs Scheidler

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

Quoted 3 lines

last invocation will be used three times.

try writing 3 printf() statements, or copy the result of inet_ntoa()

to a

Quoted 5 lines

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.