FONNEMANN Mark, on ven. 05 mai 2017 22:38:20 +0000, wrote:
> >Could you run tcpdump inside the guest so we are sure what the nslookup call
> >emits?
>
> Is there another way to determine this info? My guest OS is an embedded
> system with BusyBox 1.25 and not much else.
The attached patch should be dumping the same kind of information.
Samuel
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index 348e1dca5a..ada6f0d059 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -41,6 +41,7 @@
#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
+#include "qemu/log.h"
static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp);
static void ip_freef(Slirp *slirp, struct ipq *fp);
@@ -93,6 +94,8 @@ ip_input(struct mbuf *m)
ip = mtod(m, struct ip *);
+ qemu_log("ip input %x -> %x %x\n", ntohl(ip->ip_src.s_addr),
ntohl(ip->ip_dst.s_addr), ip->ip_p);
+
if (ip->ip_v != IPVERSION) {
goto bad;
}
diff --git a/slirp/udp.c b/slirp/udp.c
index 227d779022..521c3a5a57 100644
--- a/slirp/udp.c
+++ b/slirp/udp.c
@@ -41,6 +41,7 @@
#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
+#include "qemu/log.h"
static uint8_t udp_tos(struct socket *so);
@@ -95,6 +96,7 @@ udp_input(register struct mbuf *m, int iphlen)
ip = mtod(m, struct ip *);
uh = (struct udphdr *)((caddr_t)ip + iphlen);
+ qemu_log("udp input %u -> %u\n", (unsigned) ntohs(uh->uh_sport),
(unsigned) ntohs(uh->uh_dport));
/*
* Make mbuf data length reflect UDP length.
* If not enough data to reflect UDP length, drop.