diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-11-16 16:40:08 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-12-01 11:33:24 +0100 |
commit | 1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80 (patch) | |
tree | 7194c8604238aa9f162cf603ce9ac627d05e1752 | |
parent | 2fc963326df7d39a83ea768416329a27b9fd6e1c (diff) | |
download | slirp-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.c | 3 |
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) { |