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

Ovidiu Sas sip.nslu at gmail.com
Mon Feb 19 14:30:16 CET 2007


Hi Bogdan,

The ip_addr in the lcr module is populated with the value stored in
the database, which is stored in LE format (openserctl script: lcr
addgw).


Regards,
Ovidiu Sas

On 2/19/07, Bogdan-Andrei Iancu <bogdan at voice-system.ro> wrote:
> 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?
> >
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>



More information about the Devel mailing list