Branch: refs/heads/fixes Home: https://github.com/kronosnet/kronosnet Commit: 70506373f87193777a4c6ff336a9621801544420 https://github.com/kronosnet/kronosnet/commit/70506373f87193777a4c6ff336a962... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2017-10-17 (Tue, 17 Oct 2017)
Changed paths: M libknet/transport_udp.c
Log Message: ----------- [udp] fix incorrect return code
UDP TX is tricky and racy and in theory TX never fails, as UDP is allowed to drop packets internally anyway.
In some race condition situations, we can endup in a situation where: - thread X attempts to send a packet - socket receives an ICMP back (for whatever reasons) generated by some other random thread/packet combo - thread X detects an error in TX and decode the error (correct)
pre patch: - thread X would treat that as error and drop the packet post patch: - thread X should simply resend the packet
simply also the ordering of parsing socket error code to make it easier to read
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com