提交 e3a110b5 编写于 作者: J Jan Kiszka

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: NJan Kiszka <jan.kiszka@siemens.com>
上级 fd593879
......@@ -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++;
......
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册