diff --git a/slirp/if.c b/slirp/if.c index 47bebe4925d05b510c425a4b26e751b95efc6f79..2852396a4a50ff14e80290f852a7b1389c430f2f 100644 --- a/slirp/if.c +++ b/slirp/if.c @@ -106,9 +106,6 @@ if_output(struct socket *so, struct mbuf *ifm) ifs_init(ifm); insque(ifm, ifq); - /* Expiration date = Now + 1 second */ - ifm->expiration_date = qemu_get_clock_ns(rt_clock) + 1000000000ULL; - diddit: slirp->if_queued++; diff --git a/slirp/slirp.c b/slirp/slirp.c index a86cc6eb2db3b8c8ca9fcf889582396d8741fa43..2c242ef4ebcbc89320b9134830fe60fb6d672227 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -738,6 +738,9 @@ int if_encap(Slirp *slirp, struct mbuf *ifm) slirp->client_ipaddr = iph->ip_dst; slirp_output(slirp->opaque, arp_req, sizeof(arp_req)); ifm->arp_requested = true; + + /* Expire request and drop outgoing packet after 1 second */ + ifm->expiration_date = qemu_get_clock_ns(rt_clock) + 1000000000ULL; } return 0; } else {