mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 03:13:44 +08:00
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) {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user