To fix avoid EISCONN if addr is specified for sendto(), the old commit changed the linux_sendto() to ignore the target address if the socket state is in a connected/connecting state.
This commit causes many issues now, such as ARP packet sending failure, wpa_supplier failed to send L2 packets.
linux_sendto() is used for all kinds of socket, such as netlink, unix, l2 socket, etc. What more, for most socket(exclude udp and tcp), the socket state is always set to "connected" from it created.
so the old commit maybe cause these type sockets calling sendto() failure.
In fact, the socket that has the original issue is UDP protocol. When the socket has already called the connect(), if an address is specified in the sendto(), EISCONN error will be returned.
Therefore, to fix this type of socket issue is a better way than that: If addr is specified for sendto(), the connected address is ignored (just like Linux behavior).