diff -ru libipt_ACCOUNT-1.3/iptaccount/iptaccount.c libipt_ACCOUNT-1.3.byteorder/iptaccount/iptaccount.c --- libipt_ACCOUNT-1.3/iptaccount/iptaccount.c 2007-12-14 10:42:42.000000000 +0100 +++ libipt_ACCOUNT-1.3.byteorder/iptaccount/iptaccount.c 2009-10-13 15:13:05.000000000 +0200 @@ -34,8 +34,9 @@ static char buf[17]; const unsigned char *bytep; + addr = htonl(addr); bytep = (const unsigned char *) &addr; - snprintf(buf, 16, "%u.%u.%u.%u", bytep[0], bytep[1], bytep[2], bytep[3]); + snprintf(buf, 16, "%u.%u.%u.%u", ((addr&0xFF000000)>>24), ((addr&0x00FF0000)>>16), ((addr&0x0000FF00)>>8),(addr&0x000000FF)); buf[16] = 0; return buf; }