diff options
author | Fabien Chouteau <chouteau@adacore.com> | 2011-08-01 18:18:37 +0200 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2011-08-03 12:57:11 +0200 |
commit | 1ab74cea060d776b19857c3babc64d729bbdba5c (patch) | |
tree | 024f3b1df329cc1cbf5cd0069df0e585e5ffe957 /slirp/mbuf.c | |
parent | 1a0ca1e1f6011a8623ec0653a1b35bbfc3f576c9 (diff) |
Delayed IP packets
In the current implementation, if Slirp tries to send an IP packet to a client
with an unknown hardware address, the packet is simply dropped and an ARP
request is sent (if_encap in slirp/slirp.c).
With this patch, Slirp will send the ARP request, re-queue the packet and try
to send it later. The packet is dropped after one second if the ARP reply is
not received.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'slirp/mbuf.c')
-rw-r--r-- | slirp/mbuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/slirp/mbuf.c b/slirp/mbuf.c index ce2eb843f5..c699c75096 100644 --- a/slirp/mbuf.c +++ b/slirp/mbuf.c @@ -70,6 +70,8 @@ m_get(Slirp *slirp) m->m_len = 0; m->m_nextpkt = NULL; m->m_prevpkt = NULL; + m->arp_requested = false; + m->expiration_date = (uint64_t)-1; end_error: DEBUG_ARG("m = %lx", (long )m); return m; |