qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] slirp: fix pinging the virtual ipv4 DNS server


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH] slirp: fix pinging the virtual ipv4 DNS server
Date: Sat, 29 Apr 2017 19:36:55 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 04/29/2017 09:47 AM, Samuel Thibault wrote:
so that people do not think it is not working at least basically.

Signed-off-by: Samuel Thibault <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


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 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]