diff options
author | Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 2009-09-23 03:17:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-24 15:38:57 -0700 |
commit | 18a1166de994685d770425086b2bcc1ba567f7ed (patch) | |
tree | 748916e0e5640506b438b7bcafb863153a4c0816 /net/phonet/af_phonet.c | |
parent | 582b0b611345fc8d9ab8a0605d2f14c468902719 (diff) | |
download | blackbird-op-linux-18a1166de994685d770425086b2bcc1ba567f7ed.tar.gz blackbird-op-linux-18a1166de994685d770425086b2bcc1ba567f7ed.zip |
Phonet: error on broadcast sending (unimplemented)
If we ever implement this, then we can stop returning an error.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/af_phonet.c')
-rw-r--r-- | net/phonet/af_phonet.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index a662e62a99cf..f60c0c2aacba 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c @@ -168,6 +168,12 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, goto drop; } + /* Broadcast sending is not implemented */ + if (pn_addr(dst) == PNADDR_BROADCAST) { + err = -EOPNOTSUPP; + goto drop; + } + skb_reset_transport_header(skb); WARN_ON(skb_headroom(skb) & 1); /* HW assumes word alignment */ skb_push(skb, sizeof(struct phonethdr)); |