Problem using REDIRECT and SO_ORIGINAL_DST
Quoted 3 lines · Balazs Scheidler
inet_ntoa()uses a static buffer to format its result, you are callinginet_ntoathree 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 ofinet_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.