I've got 0.9.7-pre1 running with the included LCR & mysql modules. Am I the only one who's annoyed at the handling of IP addresses in LCR?
First,
I don't see why gw.ip_addr has to be an int. Is a varchar column for the IP
address really that much of a performance hit? Isn't there something to
be said for human readable and editable tables?
Second, if it
has to be an unsigned int, shouldn't some attention be paid to byte order? This module appears to assume that the IP address in the
table is in Intel byte order (little endian). This will break if the
address is in network byte order (big endian), as it would be if, for
example, the MySQL INET_ATON() function was used to convert an IP
address to an int.
You can verify this with "serctl fifo
lcr_dump" which will call print_gws, which inexplicably does a
homegrown IP address decode, instead of calling the appropriate C
library functions to convert IP addresses into proper byte order.