[Devel] [ openser-Bugs-1653584 ] lcr broken on big endian platforms

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Feb 19 10:30:20 CET 2007


Hi Juha,

the convention is to keep in the struct ip_addr an IP address in network 
order. All functions populating this type of structure do that (or at 
least they should). ip_addr2a() expects a network order.

the question is how the ip_addr structs are populated in lcr module?

regards,
bogdan

Juha Heinanen wrote:
>  >  2. the print_gws() should use ip_addr2a() to print the IP address
>  >  3. before using the ip_addr2a(), the host to network translation
>  >  must be applied (inside do_load_gws() and print_gws() functions)
>
> this part i don't (at least now) agree to.  lcr code is using openser's
> ip_addr2a in many places to convert ip address from internal
> representation to string.
>
> if there is a problem with endianity, should ip_addr2a function be fixed
> so that it works correctly no matter what endianity the host is?
>
> comments from whoever who considers him/herself responsible of ip_addr2a
> function?
>   



More information about the Devel mailing list