ieee802154: fix dgram socket sendmsg()
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Wed, 14 May 2014 15:43:10 +0000 (17:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 May 2014 19:51:43 +0000 (15:51 -0400)
commit1cc76e365405eae54a15e86b5d75ee885cd7d891
tree0870bee3e462afd904eceb63e832aae521978931
parentd4b2816d67d6e07b2f27037f282d8db03a5829d7
ieee802154: fix dgram socket sendmsg()

802.15.4 datagram sockets do not currently have a compliant sendmsg().
The destination address supplied is always ignored, and in unconnected
mode, packets are broadcast instead of dropped with -EDESTADDRREQ. This
patch fixes 802.15.4 dgram sockets to be compliant, i.e.

 !conn && !msg_name => -EDESTADDRREQ
 !conn &&  msg_name => send to msg_name
  conn && !msg_name => send to connected
  conn &&  msg_name => -EISCONN

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/dgram.c