Make the IPv6 code path follow the IPv4 code path by writing out the
IPObfuscator counter in network byte order.
This makes the obfuscated IPv6 addresses easier to read and avoids
making the output of the tool vary based on the host byte order.
#endif
#include "statbag.hh"
#include "dnspcap.hh"
+#include "iputils.hh"
#include "namespaces.hh"
#include "namespaces.hh"
uint64_t *dst=(uint64_t*)&pr.d_ip6->ip6_dst;
if(dh->qr)
- *dst=ipo.obf6(*dst);
+ *dst=htobe64(ipo.obf6(*dst));
else
- *src=ipo.obf6(*src);
+ *src=htobe64(ipo.obf6(*src));
}
pw.write();
}