[LEDE-DEV] iodine bad endianess?

Gui Iribarren gui at altermundi.net
Wed Nov 29 08:20:47 PST 2017

i've been trying to run iodine (client) on LEDE,
but the packets generated by the client have a weird problem, which
looks like some endianness issue.
Comparing the initial handshake packets generated by debian iodine
client (which works fine), and LEDE one (which never connects to server)
the debian client correctly starts the conversation with an outgoing dns
query (Wireshark says "Flags: 0x0100 Standard query")
while the iodine client compiled for LEDE sends a very similar packet,
but with a reversed byte, so "Flags: 0x8000 Standard query response"

this (wrong) packet, of course, is not recognized by server.
why does iodine client code produce different packets when running on
debian than on LEDE?

notably, 0x0100 is 0000 0001 0000 0000
while    0x8000 is 1000 0000 0000 0000

any pointers on what needs to be set during compile time, so that iodine
will not swap bytes like it does now?

(will be happy to patch Makefile myself, and contribute fix to the list,
of course)


just for the record, i'm on a TP-Link WR841N freshly flashed, with the
binary i downloaded yesterday from

and opkg installed iodine from

root at LEDE:~# cat /etc/openwrt_version
root at LEDE:~# opkg list iodine
iodine - 0.7.0-2 - iodine client version
root at LEDE:~# iodine -v
iodine IP over DNS tunneling client
version: 0.7.0 from 2014-06-16

gui at debian:~ $ iodine -v
iodine IP over DNS tunneling client
version: 0.7.0 from 2014-06-16
gui at debian:~ $ dpkg -l iodine | grep ii
ii  iodine         0.7.0-3      i386         tool for tunneling IPv4
data through a DNS server

More information about the Lede-dev mailing list