On Mon, 2018-10-29 at 17:48 +0100, Sven Eckelmann wrote:
On Montag, 29. Oktober 2018 17:07:26 CET Jonathan Haws wrote: [...]
One thing to note (and Sven, maybe you can tell me if this is expected): in my testing I found that alfred is getting into this ipv4_arp_request call for the local node as well, thus the very first ioctl() will fail with "No such device or address". Should there be a check for this being the local node and just discard it before making the check or is making the check all the time then discarding okay?
Uhm, this sounds extremely wrong to me. Why would you receive your own UDP packets (push_data, announce_master, status_txend) again in the first place? See netsock_own_address for the code which drops such packets in the main recv function - you should know it because you've tried to modify it for IPv4 support.
I need to double check - I had thought I explicitly disabled IP_MULTICAST_LOOP, but if not I need to. This would be my first guess at why we'd be seeing our own UDP packets.
But your memory initialization is completely broken and have to be fixed. Right now, you are just comparing uninitialized memory regions against each other.
It looks like you fixed the memory initialization issue in your latest commit (recv.c, zeroing the alfred_source variable)? I'll pull this and see how it affects the behavior.