commit 491abfc62a31c5c0a16e6e7b5c0aadd5f64602fb
Author: Christine Caulfield <ccaulfie@redhat.com>
Date: Thu Dec 13 09:59:30 2018 +0000
UDP: Cope with EPERM returned from sendmsg/sendto
IPtables can cause -EPERM to be returned from socket sends, so
we need to be able to handle it without going into a spin.
SCTP seems to be unaffected.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
diff --git a/libknet/transport_udp.c b/libknet/transport_udp.c
index 25e1ae6..3144502 100644
--- a/libknet/transport_udp.c
+++ b/libknet/transport_udp.c
@@ -401,7 +401,7 @@ int udp_transport_tx_sock_error(knet_handle_t knet_h, int sockfd, int recv_err,
read_errs_from_sock(knet_h, sockfd);
return 0;
}
- if (recv_errno == EINVAL) {
+ if (recv_errno == EINVAL || recv_errno == EPERM) {
return -1;
}
if ((recv_errno == ENOBUFS) || (recv_errno == EAGAIN)) {