Closed uhppoted closed 6 months ago
Notes:
sudo tcpdump -vv -k -i any udp port 60001
tcpdump: data link type PKTAP tcpdump: listening on any, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes 12:01:24.987898 IP (tos 0x0, ttl 64, id 64697, offset 0, flags [none], proto UDP (17), length 92, bad cksum 0 (->f9be)!) 192.168.1.100.57353 > 192.168.1.100.60001: [bad udp cksum 0x8472 -> 0x142d!] UDP, length 64 12:01:24.987910 IP (tos 0x0, ttl 64, id 64697, offset 0, flags [none], proto UDP (17), length 92, bad cksum 0 (->f9be)!) 192.168.1.100.57353 > 192.168.1.100.60001: [bad udp cksum 0x8472 -> 0x142d!] UDP, length 64
7. `watch -n 60 "echo "woot" | nc -u -w 1 192.168.1.100 60001"` works fine (_WireShark_/_tcpdump_ on the host see all _woot_ packets).
8. `tcpdump -vv -i any udp port 60001` in the container shows the packet being sent but it never reaches WireShark.
_Something to do with the bridge network maybe ???_
Resolved - reworked the simulator event handling to use a new connected UDP socket rather than reusing the bound listen socket to send the event to the event listener. This is technically the correct way to do it but interestingly it's only a problem on Docker.
uhppote-simulator hosted in recent'ish versions of Docker containers stop broadcasting events "after a while" (running the simulator from the command line does not exhibit the behaviour).