[Slirp] [Git][slirp/libslirp][master] poll_fd: add missing fd registration for UDP and ICMP

Samuel Thibault (@sthibaul) gitlab at gitlab.freedesktop.org
Sun Jun 6 23:23:47 UTC 2021



Samuel Thibault pushed to branch master at slirp / libslirp


Commits:
5758d835 by Samuel Thibault at 2021-06-07T01:23:36+02:00
poll_fd: add missing fd registration for UDP and ICMP

Signed-off-by: Samuel Thibault <samuel.thibault at ens-lyon.org>

- - - - -


2 changed files:

- src/ip_icmp.c
- src/udp.c


Changes:

=====================================
src/ip_icmp.c
=====================================
@@ -95,6 +95,7 @@ static int icmp_send(struct socket *so, struct mbuf *m, int hlen)
     if (so->s == -1) {
         return -1;
     }
+    so->slirp->cb->register_poll_fd(so->s, so->slirp->opaque);
 
     if (slirp_bind_outbound(so, AF_INET) != 0) {
         // bind failed - close socket


=====================================
src/udp.c
=====================================
@@ -328,6 +328,7 @@ int udp_attach(struct socket *so, unsigned short af)
         so->so_expire = curtime + SO_EXPIRE;
         insque(so, &so->slirp->udb);
     }
+    so->slirp->cb->register_poll_fd(so->s, so->slirp->opaque);
     return (so->s);
 }
 



View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/5758d835e431886e862a8b849ac2236b7cfed067

-- 
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/5758d835e431886e862a8b849ac2236b7cfed067
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20210606/306ebff1/attachment.htm>


More information about the Slirp mailing list