RE: SO_ORIGINAL_DST returning bogus port number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a lot for responding.
The key was " ntohs()" which i didn't have and you mentioned. It works properly now.

>
>You have to use
>
>else {
>	char buf[16];
>	inet_ntop(AF_INET, &dst_addr.sin_addr, dst, sizeof(dst));
                                               ^ buf, not dst

>	printf("%s:%hu\n", buf, ntohs(dst_addr.sin_port));
>}

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux