[patch] hostap alignment error dumping RADIUS_ATTR_IP
Michael Taylor
mike.taylor
Sun Nov 4 22:06:08 PST 2007
>> + struct in_addr addr;
>> + addr.s_addr = WPA_GET_BE32(pos);
>> + printf(" Value: %s\n", inet_ntoa(addr));
>>
>
> Thanks! Though please note that inet_ntoa() needs to get the value
> without any byte swapping and as such, this code would not work on
> little-endian CPU. I fixed this by just copying the data to local struct
> in_addr.
>
Good catch. Thanks. Can you paste the fragment you wound up using ?
More information about the Hostap
mailing list