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>
This commit is contained in:
parent
17eb587aeb
commit
7d1724976f
|
@ -152,8 +152,9 @@ icmp_input(struct mbuf *m, int hlen)
|
||||||
switch (icp->icmp_type) {
|
switch (icp->icmp_type) {
|
||||||
case ICMP_ECHO:
|
case ICMP_ECHO:
|
||||||
ip->ip_len += hlen; /* since ip_input subtracts this */
|
ip->ip_len += hlen; /* since ip_input subtracts this */
|
||||||
if (ip->ip_dst.s_addr == slirp->vhost_addr.s_addr) {
|
if (ip->ip_dst.s_addr == slirp->vhost_addr.s_addr ||
|
||||||
icmp_reflect(m);
|
ip->ip_dst.s_addr == slirp->vnameserver_addr.s_addr) {
|
||||||
|
icmp_reflect(m);
|
||||||
} else if (slirp->restricted) {
|
} else if (slirp->restricted) {
|
||||||
goto freeit;
|
goto freeit;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue