diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-04-29 14:37:09 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-04-29 18:29:58 +0200 |
commit | 7d1724976f1f460769f4dddcdb15369cd57cf72e (patch) | |
tree | 7df663ce077a0c02662b630882a8a3cd9d310bf1 /slirp | |
parent | 17eb587aeb492fe68f8130b027154ff0921fc0b4 (diff) | |
download | qemu-7d1724976f1f460769f4dddcdb15369cd57cf72e.zip qemu-7d1724976f1f460769f4dddcdb15369cd57cf72e.tar.gz qemu-7d1724976f1f460769f4dddcdb15369cd57cf72e.tar.bz2 |
slirp: fix pinging the virtual ipv4 DNS server
so that people do not think it is not working at least basically.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/ip_icmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 5ffc7a6..0b667a4 100644 --- a/slirp/ip_icmp.c +++ b/slirp/ip_icmp.c @@ -152,8 +152,9 @@ icmp_input(struct mbuf *m, int hlen) switch (icp->icmp_type) { case ICMP_ECHO: ip->ip_len += hlen; /* since ip_input subtracts this */ - if (ip->ip_dst.s_addr == slirp->vhost_addr.s_addr) { - icmp_reflect(m); + if (ip->ip_dst.s_addr == slirp->vhost_addr.s_addr || + ip->ip_dst.s_addr == slirp->vnameserver_addr.s_addr) { + icmp_reflect(m); } else if (slirp->restricted) { goto freeit; } else { |