From e3a110b527f749a2acec079c261f4481aadd3edc Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 5 Aug 2011 14:05:53 +0200 Subject: slirp: Only start packet expiration for delayed ones The expiration timeout must only affect packets that are queued due to pending ARP resolutions. The old version broke ping e.g. Signed-off-by: Jan Kiszka --- slirp/slirp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'slirp/slirp.c') diff --git a/slirp/slirp.c b/slirp/slirp.c index a86cc6eb2d..2c242ef4eb 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 { -- cgit v1.2.3