OUTPUT NFQUEUE UDP destination port is 0

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

 



Hi,

I am trying to write a program, using C, that binds to an OUTPUT
NFQUEUE and makes some changes to certain UDP packets.

I'm running into an issue, however, with getting the destination port.
For some reason, no matter what I try, the destination port in the
udphdr struct is 0. The source port is fine, and the packet is
received properly on the other end with the destination port set (I
checked this with wireshark on my own computer). Everything else seems
fine - IP header has the proper info.. it's just the UDP header that
seems messed up.

The basic code I'm using:

struct udphdr *udp=(struct udphdr *)(pkt_data+21);

printf("Source port: %u\nDest port: %u\n", udp->source, udp->dest);

Thank you,

L
--
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