UDP is giving errors

44 views
Skip to first unread message

Ibtisam Tariq

unread,
Sep 12, 2022, 9:31:09 AM9/12/22
to packetdrill
Hello, 

I have been trying to write a UDP testing script, but it is giving an error at the UDP packet line.
My script is (Took ref from: https://groups.google.com/g/packetdrill/c/ukcu93Y8LK8/m/-cYw3jh2AgAJ)
    0 socket(..., SOCK_DGRAM, IPPROTO_UDP) = 3
 +.01 sendto(3, ..., 500, 0, ..., ...) = 500
  +0 > udp (500)

But it is giving an error: (Both sides)
./udp2.pkt:3: error handling packet: no matching socket for script packet

I have been running it using a wire server and client framework.
Command at the client side is:
sudo ../../packetdrill/packetdrill  --local_ip=11.0.0.21 --gateway_ip=11.0.0.1 --netmask_ip=255.0.0.0 --remote_ip=11.0.0.15/24 --wire_client --wire_client_dev="eno8" --wire_server_ip=192.168.3.120  ./udp2.pkt

Command at the server side:
sudo ./packetdrill --wire_server --wire_server_dev=enp1s0f0

Please let me know the possible steps to test UDP.
Thanks, 
- Ibtisam

Neal Cardwell

unread,
Sep 13, 2022, 11:00:28 PM9/13/22
to Ibtisam Tariq, packetdrill
Thanks for the report!

I'm able to reproduce the problem you report with UDP packets in remote/"wire" tests.

I have some proposed patches that may fix this, but have not had a chance to test them much. Would you be able to test by applying the attached patches with "git am *patch", recompiling, and re-running your tests?

Thanks!
neal


--
You received this message because you are subscribed to the Google Groups "packetdrill" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packetdrill...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packetdrill/0919fbb0-af5a-450d-aedf-0d1e14591354n%40googlegroups.com.
0003-net-test-packetdrill-allow-wire-server-to-create-non.patch
0001-net-test-packetdrill-add-ip_parse-to-parse-an-IPv4-o.patch
0002-net-test-packetdrill-allow-wire_server_ip-to-be-IPv6.patch

Ibtisam Tariq

unread,
Sep 22, 2022, 8:48:42 AM9/22/22
to packetdrill

Hello Neal,

I have tried your provided patches. Now I am not getting any error, seems like a socket has been created. But it stuck at the packet line. 
I am attaching the logs of both the wire server and wire client, and the script too for you to review. (by setting the DEBUG_LOGGING to 1).

Please have a look at it. 
Thanks
- Ibtisam
wire_server.txt
wire_client.txt
udp2.pkt

Neal Cardwell

unread,
May 21, 2023, 3:00:08 PM5/21/23
to packetdrill
Hi,

Sorry for the delay. I have pushed a commit to the packetdrill repo that should hopefully fix the handling of UDP packets in remote mode. Can you please fetch the latest code from https://github.com/google/packetdrill and see if this fixes your issue? If it does not, then can you please share the script you are using and any output you see? 

Thanks!
neal
Reply all
Reply to author
Forward
0 new messages