diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-08-05 14:05:53 +0200 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2011-08-05 14:05:53 +0200 |
commit | e3a110b527f749a2acec079c261f4481aadd3edc (patch) | |
tree | a81de40813177d2d0ce64adcb1675e710a47ad86 /slirp/slirp.c | |
parent | fd5938799d115c966f9b2d41bbb4d5bcb5284b97 (diff) | |
download | qemu-e3a110b527f749a2acec079c261f4481aadd3edc.zip qemu-e3a110b527f749a2acec079c261f4481aadd3edc.tar.gz qemu-e3a110b527f749a2acec079c261f4481aadd3edc.tar.bz2 |
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 <jan.kiszka@siemens.com>
Diffstat (limited to 'slirp/slirp.c')
-rw-r--r-- | slirp/slirp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c index a86cc6e..2c242ef 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 { |