aboutsummaryrefslogtreecommitdiffstats
path: root/libglouglou/examples/dnsreverse.c
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-12-15 07:19:06 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-12-15 07:19:06 +0100
commitf5cab42c844d281be2c5b55844e26501308f64ce (patch)
tree29af5882c8173ae42f812c4c5a2405da14de402a /libglouglou/examples/dnsreverse.c
parentrevert previous commit, my brain was deeply flawed (diff)
downloadglouglou-f5cab42c844d281be2c5b55844e26501308f64ce.tar.xz
glouglou-f5cab42c844d281be2c5b55844e26501308f64ce.zip
fix dns resolving: evdns eats network byte order !
Diffstat (limited to 'libglouglou/examples/dnsreverse.c')
-rw-r--r--libglouglou/examples/dnsreverse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglouglou/examples/dnsreverse.c b/libglouglou/examples/dnsreverse.c
index 33b0f75..5111391 100644
--- a/libglouglou/examples/dnsreverse.c
+++ b/libglouglou/examples/dnsreverse.c
@@ -24,6 +24,8 @@ main(int argc, char *argv[])
exit(1);
}
inet_aton(argv[1], &ip);
+ ip.s_addr = ntohl(ip.s_addr);
+
bzero(&tv, sizeof(struct timeval));
tv.tv_sec = 5;