On Thu, May 27, 2004 at 09:13:01AM -0700, Mark Glines wrote:
> Hmm. I sent a patch to the list in October 2003 which makes hostapd recover
> from ethernet status changes. I didn't get any response. My original message
> is: http://sisyphus.iocaine.com/pipermail/hostap/2003-October/004463.html>> I think there's a good chance the same patch will fix your issue. I've
> attached it; can you please test it?
Thanks for bringing this up again! I did notice your previous email, but
the patch had some issues and required more testing than I had time at
that point. Consequently, it was buried down in an endless pile of
things to do..
Anyway, the main issue was that the eloop handler for the socket needs
to be unregistered when closing the socket or horrible things will
happen.. eloop_unregister_read_sock() did not exist in October 2003, but
it is now there, so I fixed the patch and committed it to CVS.
Another smaller issue is in which errno's to process. At least Linux
2.6.x generates different error codes based on what caused the error
(changed IP address, interface down/network unreachable). I added
EDESTADDRREQ (used if connect() failed) and EINVAL (used if IP address
changed and the locally bound address cannot be used anymore).
Based on quick testing, all the cases I came up with are now working
with the CVS snapshot version.
--
Jouni Malinen PGP id EFC895FA