[PATCH 1/1] STA Fix error case prints for nl_recvmsgs

Jouni Malinen j at w1.fi
Mon May 26 10:41:08 EDT 2014


On Fri, May 23, 2014 at 11:21:07AM +0530, Jithu Jance wrote:
> I got the below prints on a particluar Android platform.
> 
> I/wpa_supplicant( 2637): nl80211: send_and_recv->nl_recvmsgs failed: 20
> I/wpa_supplicant( 2637): nl80211: send_and_recv->nl_recvmsgs failed: 20
> 
> In JellyBean libnl_2 code, I see that the nl_recvmsgs returns postive values
> too. In some cases, nl_recvmgs return the output of nl_recv function. nl_recv
> function can return Number of bytes read, 0 or a negative error code.
> 
> Looks like this postive return value for nl_recvmsgs may be specific to Android.

This sounds like an incorrect nl_recvmsgs() re-implementation.. It would
probably make more sense to fix that in Android libnl clone rather than
make wpa_supplicant assume something about the libnl API use that does
not match documented main implementation. The changes here would seem
safe in general, but the justification for wpa_supplicant to work around
something like this in Android is somewhat weak. What I'm more worried
about is in there being something else about nl_recvmsgs() behavior that
could result in more significant issues than unexpected debug messages,
though.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list