To fix Aavoid EISCONN if addr is specified for sendto(), the old commit changed the linux_sendto() to ignore the target address Ifif the socket state is in a connected/connecting state.
This modificationcommit causes many issues now, linux_sendto() is a calling function for various socket typessuch as arp packet send failed, such aswpa_supplicant send L2 packet failed.
linux_sendto() is a calling function for various socket types, such as netlink, unix, l2 socket(SOCKET_RAW). and wWhat more, for most socket(exclude udp and tcp), the socket state is always set to "connected" from it created.
so the old modificationcommit cause these socket sendto failed: such as arp packet send failed, wpa_supplicant send L2 packet failed.
In fact, the socket that has thisthe original issue is UDP socketprotocol. When the socket has already called the connect(), if an address is specified in the sendto(), EISCONN error will be returned. Therefore, we just need to fix this type of socket issue is a better way.