OT: how to change eapol_test.c to use same udp source port?
vincent.mc.li at gmail.com
Sun Dec 18 22:06:53 EST 2011
On Sun, Dec 18, 2011 at 10:55 AM, Jouni Malinen <j at w1.fi> wrote:
> On Sun, Dec 18, 2011 at 10:10:39AM -0800, Vincent Li wrote:
>> this topic might be off, I have a situation that I need to modify
>> eapol_test.c or some part of wpa_supplicant to let eapol_test.c use
>> same udp source port to test my radius server to reproduce a problem,
>> I looked an eapol_test.c code, it is not obvious to me where I can
>> change it to use same source port. could somepone shed a light on
> eapol_test uses the RADIUS client implementation in
> src/radius/radius_client.c. You can modify radius_change_server() there
> to bind the socket to a specific local socket. The easiest way of doing
> this would be modify the force_client_addr case that is already calling
> bind(). Just change the htons(0) to a specific port instead of
> auto-selection. You'll need to pass -A<local IP addr> to eapol_test to
> get that force_client_addr case getting called.
Thanks, I got it working.
More information about the HostAP