aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-11-16 16:40:08 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-12-01 11:33:24 +0100
commit1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80 (patch)
tree7194c8604238aa9f162cf603ce9ac627d05e1752
parent2fc963326df7d39a83ea768416329a27b9fd6e1c (diff)
downloadslirp-1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80.zip
slirp-1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80.tar.gz
slirp-1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80.tar.bz2
socket: consume empty packets
it fixes a tightloop when a packet with len==0 is received. Closes: https://github.com/rootless-containers/slirp4netns/issues/227 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--src/socket.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/socket.c b/src/socket.c
index 3fbb873..22f615b 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -534,9 +534,6 @@ void sorecvfrom(struct socket *so)
DEBUG_MISC(" ioctlsocket errno = %d-%s\n", errno, strerror(errno));
return;
}
- if (n == 0) {
- return;
- }
m = m_get(so->slirp);
if (!m) {