Commit 18a1166d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by David S. Miller

Phonet: error on broadcast sending (unimplemented)

If we ever implement this, then we can stop returning an error.
Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 582b0b61
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#define PNPIPE_IFINDEX 2 #define PNPIPE_IFINDEX 2
#define PNADDR_ANY 0 #define PNADDR_ANY 0
#define PNADDR_BROADCAST 0xFC
#define PNPORT_RESOURCE_ROUTING 0 #define PNPORT_RESOURCE_ROUTING 0
/* Values for PNPIPE_ENCAP option */ /* Values for PNPIPE_ENCAP option */
......
...@@ -168,6 +168,12 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, ...@@ -168,6 +168,12 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
goto drop; goto drop;
} }
/* Broadcast sending is not implemented */
if (pn_addr(dst) == PNADDR_BROADCAST) {
err = -EOPNOTSUPP;
goto drop;
}
skb_reset_transport_header(skb); skb_reset_transport_header(skb);
WARN_ON(skb_headroom(skb) & 1); /* HW assumes word alignment */ WARN_ON(skb_headroom(skb) & 1); /* HW assumes word alignment */
skb_push(skb, sizeof(struct phonethdr)); skb_push(skb, sizeof(struct phonethdr));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment