aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip_icmp.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-04-29 14:37:09 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-04-29 18:29:58 +0200
commit7d1724976f1f460769f4dddcdb15369cd57cf72e (patch)
tree7df663ce077a0c02662b630882a8a3cd9d310bf1 /slirp/ip_icmp.c
parent17eb587aeb492fe68f8130b027154ff0921fc0b4 (diff)
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/ip_icmp.c')
-rw-r--r--slirp/ip_icmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c
index 5ffc7a683d..0b667a429a 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 {