Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nc server not recieving udp packets sent from the client using ebpf xdp #1

Open
der-ali opened this issue May 5, 2023 · 0 comments

Comments

@der-ali
Copy link
Owner

der-ali commented May 5, 2023

Scenario:
Setup node01and node 02 with either static or bgp routing:

make setup_static 

Start a UDP server on one of the network namespaces on node01 with ebpf mode:

make test_udp_server_ebpf 

Send UDP packets to the server from a network namespace on node02:

make test_udp_client

nc server is not recieving the UDP packets!

Debug:
Capture tcp traffic on node01:

sudo ip netns exec con1 tcpdump -l -n -nn -vvv -i any port 1111

tcpdump shows bad udp cksum:

tcpdump: data link type LINUX_SLL2
tcpdump: listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
16:02:17.633509 veth11 P   IP (tos 0x0, ttl 64, id 11592, offset 0, flags [DF], proto UDP (17), length 34)
    172.16.0.1.33800 > 172.16.0.2.1111: [bad udp cksum 0xbd67 -> 0xbc67!] UDP, length 6

Display the trace output of the XDP program on node01:

sudo cat /sys/kernel/debug/tracing/trace_pipe

I suspect that the checksum logic in xdp.c not implemented correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant