[patch] hostap alignment error dumping RADIUS_ATTR_IP
Michael Taylor
mike.taylor at apprion.com
Mon Nov 5 01:06:08 EST 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