Re: [Linux-zigbee-devel] [PATCH linux-wpan] Set max_dsize to the MTU for IPv6.

2014-07-20 Thread phoebe . buckheister
> IPv6 packets sent via lowpan over iee802.15.4 with be at most 1280 octets. > > Signed-off-by: Martin Townsend > --- > net/ieee802154/reassembly.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c > index b85bd3f.

Re: [Linux-zigbee-devel] [PATCH 1/1] linux-wpan: mac802154: Fixed handling of dest mode in mac802154_subif_frame.

2014-07-18 Thread Phoebe Buckheister
On Fri, 18 Jul 2014 16:48:08 +0200 Alexander Aring wrote: > Hi, > > On Fri, Jul 18, 2014 at 11:16:17AM +0100, Martin Townsend wrote: > > For IEEE802154_ADDR_NONE it now checks that the frame type for > > acknowledgement. For the reserved dest mode it frees the skb and > > returns. > > > > Signe

Re: [Linux-zigbee-devel] [PATCH v2 net-next 11/12] at86rf230: add sleep cycle timing

2014-06-27 Thread Phoebe Buckheister
On Fri, 27 Jun 2014 16:51:40 +0530 Varka Bhadram wrote: > On 06/27/2014 04:23 PM, Alexander Aring wrote: > > Hi, > > > > On Fri, Jun 27, 2014 at 04:14:54PM +0530, Varka Bhadram wrote: > >> On 06/27/2014 03:49 PM, Alexander Aring wrote: > >>> Signed-off-by: Alexander Aring > >>> --- > >>> drive

[Linux-zigbee-devel] [PATCH net] at86rf230: fix irq setup

2014-06-18 Thread Phoebe Buckheister
ds disable all interrupt triggers on boot. On these boards, force the irq to trigger on rising edge, which is also the default for the chip. Signed-off-by: Phoebe Buckheister --- drivers/net/ieee802154/at86rf230.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/d

[Linux-zigbee-devel] some mac802154 fixes

2014-06-11 Thread Phoebe Buckheister
being pushed into the stack. --- Phoebe Buckheister (2): mac802154: properly free incoming skbs on decryption failure mac802154: don't deliver packets to devices that are down net/mac802154/monitor.c |3 ++- net/mac802154/rx.c | 11 +++ net/mac802154/w

[Linux-zigbee-devel] [PATCH v3 net-next 2/2] mac802154: don't deliver packets to devices that are down

2014-06-11 Thread Phoebe Buckheister
Only one WPAN devices can be active at any given time, so only deliver packets to that one interface that is actually up. Multiple monitors may be up at any given time, but we don't have to deliver to monitors that are down either. Signed-off-by: Phoebe Buckheister --- net/mac802154/moni

[Linux-zigbee-devel] [PATCH v3 net-next 1/2] mac802154: properly free incoming skbs on decryption failure

2014-06-11 Thread Phoebe Buckheister
mac802154 RX did not free skbs on decryption failure, assuming that the caller would when the local rx handler returned _DROP. This was false. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/mac802154/wpan.c b/net/mac802154

[Linux-zigbee-devel] [PATCH v2 net-next 2/2] mac802154: don't deliver packets to devices that are down

2014-06-10 Thread Phoebe Buckheister
Only one WPAN devices can be active at any given time, so only deliver packets to that one interface that is actually up. Multiple monitors may be up at any given time, but we don't have to deliver to monitors that are down either. Signed-off-by: Phoebe Buckheister --- net/mac802154/moni

[Linux-zigbee-devel] [PATCH v2 net-next 0/2] some mac802154 fixes

2014-06-10 Thread Phoebe Buckheister
Recent llsec code introduced a memory leak on decryption failures during rx. This fixes said leak, and optimizes the receive loops for monitor and wpan devices to only deliver skbs to devices that are actually up. --- Phoebe Buckheister (2): mac802154: properly free incoming skbs on

[Linux-zigbee-devel] [PATCH v2 net-next 1/2] mac802154: properly free incoming skbs on decryption failure

2014-06-10 Thread Phoebe Buckheister
mac802154 RX did not free skbs on decryption failure, assuming that the caller would when the local rx handler returned _DROP. This was false. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/mac802154/wpan.c b/net/mac802154

Re: [Linux-zigbee-devel] [PATCH net-next 2/2] mac802154: don't deliver packets to devices that are down

2014-06-10 Thread Phoebe Buckheister
On Tue, 10 Jun 2014 08:26:01 -0700 Eric Dumazet wrote: > On Tue, 2014-06-10 at 17:08 +0200, Phoebe Buckheister wrote: > > Only one WPAN devices can be active at any given time, so only > > deliver packets to that one interface that is actually up. > > > > Signed

[Linux-zigbee-devel] [PATCH net-next] some mac802154 fixes

2014-06-10 Thread Phoebe Buckheister
Recent llsec code introduced a memory leak on decryption failures during rx. This fixes said leak, and optimizes the receive loop to only deliver skbs to the (single) device that's actually up. --- Phoebe Buckheister (2): mac802154: properly free incoming skbs on decryption fa

[Linux-zigbee-devel] [PATCH net-next 2/2] mac802154: don't deliver packets to devices that are down

2014-06-10 Thread Phoebe Buckheister
Only one WPAN devices can be active at any given time, so only deliver packets to that one interface that is actually up. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/net/mac802154/wpan.c b/net

[Linux-zigbee-devel] [PATCH net-next 1/2] mac802154: properly free incoming skbs on decryption failure

2014-06-10 Thread Phoebe Buckheister
mac802154 RX did not free skbs on decryption failure, assuming that the caller would when the local rx handler returned _DROP. This was false. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/mac802154/wpan.c b/net/mac802154

[Linux-zigbee-devel] [PATCH net-next] mac802154: llsec: add forgotten list_del_rcu in key removal

2014-06-06 Thread Phoebe Buckheister
During key removal, the key object is freed, but not taken out of the llsec key list properly. Fix that. Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index e4a2558..1456f73 100644

[Linux-zigbee-devel] [PATCH net-next] mac802154: llsec: correctly lookup implicit-indexed keys

2014-05-20 Thread Phoebe Buckheister
Key id comparison for type 1 keys (implicit source, with index) should return true if mode and id are equal, not false. Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index

[Linux-zigbee-devel] [PATCH net-next 2/2] mac802154: llsec: fold useless return value check

2014-05-20 Thread Phoebe Buckheister
llsec_do_encrypt will never return a positive value, so the restriction to 0-or-negative on return is useless. Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index

[Linux-zigbee-devel] [PATCH net-next 0/2] mac802154: llsec oversights

2014-05-20 Thread Phoebe Buckheister
Fixes an unlock operation not matching a previous lock operation in an unlikely error path and removes a redundant check. -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Seleni

[Linux-zigbee-devel] [PATCH net-next 1/2] mac802154: llsec: fix incorrect lock pairing

2014-05-20 Thread Phoebe Buckheister
In encrypt, sec->lock is taken with read_lock_bh, so in the error path, we must read_unlock_bh. Signed-off-by: Phoebe Buckheister Reported-by: Dan Carpenter --- net/mac802154/llsec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/llsec.c b/net/mac802

[Linux-zigbee-devel] [PATCH net-next 10/11] ieee802154: add netlink interfaces for llsec

2014-05-16 Thread Phoebe Buckheister
to also move into a local helper. Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h| 31 ++ net/ieee802154/ieee802154.h | 19 + net/ieee802154/netlink.c| 20 ++ net/ieee802154/nl-mac.c | 807 +++ net/ieee802154/nl_policy.c

[Linux-zigbee-devel] [PATCH net-next 11/11] ieee802154, mac802154: implement devkey record option

2014-05-16 Thread Phoebe Buckheister
h keys too often, should still perform well. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h |1 + net/mac802154/llsec.c | 38 ++ 2 files changed, 39 insertions(+) diff --git a/include/net/ieee802154_netdev.h b/i

[Linux-zigbee-devel] [PATCH net-next 00/11] 802154: implement link-layer security

2014-05-16 Thread Phoebe Buckheister
hes haven't, because I'm not entirely sure whether this is the best approach to the problem. It performs reasonably well though, so I decided to include it as a separate patch in this series instead of sending an RFC just for this one option. --- Phoebe Buckheister (11): ieee80

[Linux-zigbee-devel] [PATCH net-next 08/11] mac802154: add llsec configuration functions

2014-05-16 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h | 36 net/mac802154/mac802154.h | 33 +++ net/mac802154/mac_cmd.c | 18 net/mac802154/mib.c | 187 +++ 4 files changed, 274 insertions

[Linux-zigbee-devel] [PATCH net-next 03/11] mac802154: add llsec structures and mutators

2014-05-16 Thread Phoebe Buckheister
associated crypto transforms - three CCM transforms for the authsizes 4/8/16 and one CTR transform for unauthenticated encryption. If we had a CCM* transform that allowed authsize 0, and authsize as part of requests instead of transforms, this would not be necessary. Signed-off-by: Phoebe Buckheister

[Linux-zigbee-devel] [PATCH net-next 06/11] mac802154: integrate llsec with wpan devices

2014-05-16 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h |3 + net/mac802154/mac802154.h | 10 net/mac802154/wpan.c| 118 +-- 3 files changed, 103 insertions(+), 28 deletions(-) diff --git a/include/net

[Linux-zigbee-devel] [PATCH net-next 07/11] ieee802154: add dgram sockopts for security control

2014-05-16 Thread Phoebe Buckheister
Allow datagram sockets to override the security settings of the device they send from on a per-socket basis. Requires CAP_NET_ADMIN or CAP_NET_RAW, since raw sockets can send arbitrary packets anyway. Signed-off-by: Phoebe Buckheister --- include/net/af_ieee802154.h | 10 ++- net

[Linux-zigbee-devel] [PATCH net-next 05/11] mac802154: add llsec decryption method

2014-05-16 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 247 + net/mac802154/llsec.h |1 + 2 files changed, 248 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 2a4b68e..392653b 100644 --- a/net/mac802154

[Linux-zigbee-devel] [PATCH net-next 01/11] ieee802154: add types for link-layer security

2014-05-16 Thread Phoebe Buckheister
particularly useful. The DeviceDescriptorHandleList was inverted and is here a per-device list, since operations on this list are likely to have both a key and a device at hand, and per-device lists of keys are shorter than per-key lists of devices. Signed-off-by: Phoebe Buckheister --- include/net

[Linux-zigbee-devel] [PATCH net-next 04/11] mac802154: add llsec encryption method

2014-05-16 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 253 + net/mac802154/llsec.h |2 + 2 files changed, 255 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index a210d1e..2a4b68e 100644 --- a/net/mac802154

[Linux-zigbee-devel] [PATCH net-next 09/11] mac802154: propagate device address changes to llsec

2014-05-16 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/mac_cmd.c | 24 +++- net/mac802154/wpan.c| 26 -- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/net/mac802154/mac_cmd.c b/net/mac802154/mac_cmd.c index afb4e2c..bf80913

[Linux-zigbee-devel] [PATCH net-next 02/11] mac802154: update Kconfig

2014-05-16 Thread Phoebe Buckheister
Link-layer security requires AES CCM for authenticated modes and AES CTR for the unauthenticated encryption mode. Signed-off-by: Phoebe Buckheister --- net/mac802154/Kconfig |4 1 file changed, 4 insertions(+) diff --git a/net/mac802154/Kconfig b/net/mac802154/Kconfig index b33dd76

Re: [Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: fix fragmentation

2014-05-14 Thread Phoebe Buckheister
On Wed, 14 May 2014 17:56:57 +0200 Alexander Aring wrote: > > + > > + frag = alloc_skb(real_dev->hard_header_len + > > +real_dev->needed_tailroom + size, > > +GFP_ATOMIC); > > Why not keep netdev_alloc_skb for the real_dev? > > But then we need to use d

[Linux-zigbee-devel] [PATCH net-next 5/6] ieee802154: fix dgram socket sendmsg()

2014-05-14 Thread Phoebe Buckheister
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 --- net/ieee802154/dgram.c | 28 +++- 1 file changed, 19 ins

[Linux-zigbee-devel] [PATCH net-next 6/6] mac802154: make mac802154_wpan_open static

2014-05-14 Thread Phoebe Buckheister
This function is only used within the same translation unit, so mark it static. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index bb49e88..ed10577 100644 --- a/net

[Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: fix fragmentation

2014-05-14 Thread Phoebe Buckheister
each skb instead of reusing the original header, let the underlying device do the rest. Signed-off-by: Phoebe Buckheister --- net/ieee802154/6lowpan_rtnl.c | 198 ++--- 1 file changed, 104 insertions(+), 94 deletions(-) diff --git a/net/ieee802154

[Linux-zigbee-devel] [PATCH net-next 1/6] ieee802154: add definitions for link-layer security and header functions

2014-05-14 Thread Phoebe Buckheister
payload size for a packet. The first obvious user for this is 6lowpan, which duplicates this calculation and gets it partially wrong because it ignores security headers. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154.h|9 +++ include/net/ieee802154_netdev.h | 29

[Linux-zigbee-devel] [PATCH net-next 3/6] ieee802154: change _cb handling slightly

2014-05-14 Thread Phoebe Buckheister
er in upper layers, since that's a thing the MAC is supposed to set on frame transmit - we set it on header creation, but assuming that upper layers do not blindly duplicate our headers, this is fine. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netde

[Linux-zigbee-devel] [PATCH net-next 2/6] mac802154: account for all header parts during wpan header creationg

2014-05-14 Thread Phoebe Buckheister
: Phoebe Buckheister --- net/mac802154/wpan.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index 1df7a6a..cb34064 100644 --- a/net/mac802154/wpan.c +++ b/net/mac802154/wpan.c @@ -231,7 +231,7 @@ static int

[Linux-zigbee-devel] [PATCH net-next v2 0/6] 802154: some cleanups and fixes

2014-05-14 Thread Phoebe Buckheister
function static, and correctly check for EMSGSIZE conditions during wpan_header_create. Changes since v1: * rename mac_cb_alloc to mac_cb_init * catch all error cases of sendmsg() instead of only !conn && msg_name * redo 6lowpan fragmentation to not clone lower layer headers --- Phoebe Buc

Re: [Linux-zigbee-devel] [PATCH net-next 4/5] ieee802154: don't ignore "to" argument in unbound dgram sendmsg

2014-05-13 Thread Phoebe Buckheister
On Tue, May 13, 2014 10:13 pm, Werner Almesberger wrote: > Phoebe Buckheister wrote: >> For some reason, unconnected 802.15.4 dgram sockets ignore the >> destination >> argument of sendmsg(), while bound sockets use it. Instead, send packets >> to the destination given

[Linux-zigbee-devel] [PATCH net-next 4/5] ieee802154: don't ignore "to" argument in unbound dgram sendmsg

2014-05-13 Thread Phoebe Buckheister
For some reason, unconnected 802.15.4 dgram sockets ignore the destination argument of sendmsg(), while bound sockets use it. Instead, send packets to the destination given by the user, and default to the connected destination only if no explicit target is given. Signed-off-by: Phoebe Buckheister

[Linux-zigbee-devel] [PATCH net-next 5/5] mac802154: make mac802154_wpan_open static

2014-05-13 Thread Phoebe Buckheister
This function is only used within the same translation unit, so mark it static. Signed-off-by: Phoebe Buckheister --- net/mac802154/wpan.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index 1477ee9..31b60b6 100644 --- a/net

[Linux-zigbee-devel] [PATCH net-next 0/5] 802154: some cleanups and fixes

2014-05-13 Thread Phoebe Buckheister
-use function static. --- Phoebe Buckheister (5): ieee802154: add definitions for link-layer security and header functions 6lowpan: simplify/fix payload length calculation ieee802154: change _cb handling slightly ieee802154: don't ignore "to" argument i

[Linux-zigbee-devel] [PATCH net-next 2/5] 6lowpan: simplify/fix payload length calculation

2014-05-13 Thread Phoebe Buckheister
Instead of accounting for all fields of a packet we can think about, simply peek the header of a packet we're building and ask ieee802154 how many bytes of payload space we have. This also accounts for security headers, which were ignored previously. Signed-off-by: Phoebe Buckheister ---

[Linux-zigbee-devel] [PATCH net-next 1/5] ieee802154: add definitions for link-layer security and header functions

2014-05-13 Thread Phoebe Buckheister
payload size for a packet. The first obvious user for this is 6lowpan, which duplicates this calculation and gets it partially wrong because it ignores security headers. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154.h|9 +++ include/net/ieee802154_netdev.h | 29

[Linux-zigbee-devel] [PATCH net-next 3/5] ieee802154: change _cb handling slightly

2014-05-13 Thread Phoebe Buckheister
er in upper layers, since that's a thing the MAC is supposed to set on frame transmit. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h | 25 +++-- net/ieee802154/6lowpan_rtnl.c |9 - net/ieee802154/dgram.c | 10 -- net

[Linux-zigbee-devel] [RFC 17/23] mac802154: propagate device address changes to llsec

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/mac_cmd.c | 24 +++- net/mac802154/wpan.c| 26 -- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/net/mac802154/mac_cmd.c b/net/mac802154/mac_cmd.c index afb4e2c..bf80913

[Linux-zigbee-devel] [RFC 18/23] ieee802154: add netlink interfaces for llsec parameter configuration

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h| 11 +++ net/ieee802154/ieee802154.h |3 + net/ieee802154/netlink.c|2 + net/ieee802154/nl-mac.c | 214 +++ net/ieee802154/nl_policy.c |8 ++ 5 files changed, 238

[Linux-zigbee-devel] [RFC 19/23] ieee802154: add netlink interfaces for llsec key table configuration

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h|6 ++ net/ieee802154/ieee802154.h |4 + net/ieee802154/netlink.c|4 + net/ieee802154/nl-mac.c | 216 +++ net/ieee802154/nl_policy.c |3 + 5 files changed, 233

[Linux-zigbee-devel] [RFC 12/23] mac802154: add llsec encryption method

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 215 + net/mac802154/llsec.h |2 + 2 files changed, 217 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 6c801f9..a672898 100644 --- a/net/mac802154

[Linux-zigbee-devel] [RFC 23/23] mac802154: implement devkey record option

2014-05-09 Thread Phoebe Buckheister
h keys too often, should still perform well. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h |1 + net/mac802154/llsec.c | 41 ++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/include/net/ieee802154_netdev.h

[Linux-zigbee-devel] [RFC 16/23] mac802154: add llsec configuration functions

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h | 36 net/mac802154/mac802154.h | 33 +++ net/mac802154/mac_cmd.c | 18 net/mac802154/mib.c | 188 ++- 4 files changed, 274 insertions

[Linux-zigbee-devel] [RFC 22/23] ieee802154: add netlink interface for llsec seclevel table configuration

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h|6 +++ net/ieee802154/ieee802154.h |4 ++ net/ieee802154/netlink.c|6 +++ net/ieee802154/nl-mac.c | 121 +++ net/ieee802154/nl_policy.c |3 ++ 5 files changed, 140

[Linux-zigbee-devel] [RFC 14/23] mac802154: integrate llsec with wpan devices

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h |3 + net/mac802154/mac802154.h |7 +++ net/mac802154/wpan.c| 128 ++- 3 files changed, 110 insertions(+), 28 deletions(-) diff --git a/include/net

[Linux-zigbee-devel] [RFC 10/23] mac802154: add llsec device key management functions

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 64 + net/mac802154/llsec.h |7 ++ 2 files changed, 71 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 77966c1..930d150 100644 --- a/net

[Linux-zigbee-devel] [RFC 20/23] ieee802154: add netlink interface for llsec device table configuration

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h|5 ++ net/ieee802154/ieee802154.h |4 ++ net/ieee802154/netlink.c|4 ++ net/ieee802154/nl-mac.c | 128 +++ net/ieee802154/nl_policy.c |2 + net/mac802154/llsec.c

[Linux-zigbee-devel] [RFC 15/23] ieee802154: add dgram sockopts for security control

2014-05-09 Thread Phoebe Buckheister
Allow datagram sockets to override the security settings of the device they send from on a per-socket basis. Requires CAP_NET_ADMIN or CAP_NET_RAW, since raw sockets can send arbitrary packets anyway. Signed-off-by: Phoebe Buckheister --- include/net/af_ieee802154.h | 10 ++- net

[Linux-zigbee-devel] [RFC 13/23] mac802154: add llsec decryption method

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 212 + net/mac802154/llsec.h |1 + 2 files changed, 213 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index a672898..c4548dc 100644 --- a/net/mac802154

[Linux-zigbee-devel] [RFC 11/23] mac802154: add llsec security level management functions

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 57 + net/mac802154/llsec.h |5 + 2 files changed, 62 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 930d150..6c801f9 100644 --- a/net

[Linux-zigbee-devel] [RFC 21/23] ieee802154: add netlink interface for llsec devkey table configuration

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h|3 ++ net/ieee802154/ieee802154.h |4 ++ net/ieee802154/netlink.c|4 ++ net/ieee802154/nl-mac.c | 114 ++- 4 files changed, 124 insertions(+), 1 deletion(-) diff --git

[Linux-zigbee-devel] [RFC 09/23] mac802154: add llsec device management functions

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 123 - net/mac802154/llsec.h |5 ++ 2 files changed, 127 insertions(+), 1 deletion(-) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 0b2319b..77966c1 100644 --- a

[Linux-zigbee-devel] [RFC 08/23] mac802154: add llsec key management functions

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/llsec.c | 174 + net/mac802154/llsec.h |6 ++ 2 files changed, 180 insertions(+) diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 5314522..0b2319b 100644 --- a/net/mac802154

[Linux-zigbee-devel] [RFC 00/00] mac802154: implement link-layer security

2014-05-09 Thread Phoebe Buckheister
ument, secured frames compatible with the -2003 version of the standard are treated as erroneous. -- Phoebe Buckheister (23): ieee802154: add definitions for link-layer security and header functions 6lowpan: simplify/fix payload length calculation ieee802154: change _cb handling sli

[Linux-zigbee-devel] [RFC 01/23] ieee802154: add definitions for link-layer security and header functions

2014-05-09 Thread Phoebe Buckheister
payload size for a packet. The first obvious user for this is 6lowpan, which duplicates this calculation and gets it partially wrong because it ignores security headers. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154.h|9 +++ include/net/ieee802154_netdev.h | 29

[Linux-zigbee-devel] [RFC 07/23] mac802154: add llsec init/destroy and parameter access functions

2014-05-09 Thread Phoebe Buckheister
Signed-off-by: Phoebe Buckheister --- net/mac802154/Makefile|3 +- net/mac802154/llsec.c | 139 + net/mac802154/llsec.h |9 +++ net/mac802154/mac802154.h |1 + 4 files changed, 151 insertions(+), 1 deletion(-) create mode

[Linux-zigbee-devel] [RFC 06/23] mac802154: update Kconfig

2014-05-09 Thread Phoebe Buckheister
Link-layer security requires AES CCM for authenticated modes and AES CTR for the unauthenticated encryption mode. Signed-off-by: Phoebe Buckheister --- net/mac802154/Kconfig |4 1 file changed, 4 insertions(+) diff --git a/net/mac802154/Kconfig b/net/mac802154/Kconfig index b33dd76

[Linux-zigbee-devel] [RFC 05/23] ieee802154: add types for link-layer security

2014-05-09 Thread Phoebe Buckheister
mac802154 implementation of llsec, we only need containers with a little management info for the ieee802154* versions of these structs. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h | 95 +++ net/mac802154/llsec.h | 77

[Linux-zigbee-devel] [RFC 03/23] ieee802154: change _cb handling slightly

2014-05-09 Thread Phoebe Buckheister
er in upper layers, since that's a thing the MAC is supposed to set on frame transmit. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h | 27 --- net/ieee802154/6lowpan_rtnl.c |9 - net/ieee802154/dgram.c | 10 -

[Linux-zigbee-devel] [RFC 04/23] ieee802154: don't ignore "to" argument in unbound dgram sendmsg

2014-05-09 Thread Phoebe Buckheister
For some reason, unconnected 802.15.4 dgram sockets ignore the destination argument of sendmsg(), while bound sockets use it. Instead, send packets to the destination given by the user, and default to the connected destination only if no explicit target is given. Signed-off-by: Phoebe Buckheister

[Linux-zigbee-devel] [RFC 02/23] 6lowpan: simplify/fix payload length calculation

2014-05-09 Thread Phoebe Buckheister
Instead of accounting for all fields of a packet we can think about, simply peek the header of a packet we're building and ask ieee802154 how many bytes of payload space we have. This also accounts for security headers, which were ignored previously. Signed-off-by: Phoebe Buckheister ---

Re: [Linux-zigbee-devel] [PATCH net-next 12/15] at86rf230: remove unnecessary buf on heap

2014-04-22 Thread Phoebe Buckheister
On Tue, April 22, 2014 8:55 pm, Alexander Aring wrote: > This patch puts a buffer on the stack instead of heap. There is no need > to hold the buffer on the heap. I put that there because I was told that heap memory is DMA safe, while stack memory need not be. If you intend to change that back to

[Linux-zigbee-devel] at86rf212 hardware (available soon-ish)

2014-04-07 Thread Phoebe Buckheister
Hello, here at the Fraunhofer ITWM we have developed a small Raspberry shield attachment[1] with an at86rf212 radio chip and an 24LC128 EEPROM wired to spi-1 and i2c-1 on the RPi header. We plan to do a production run of these boards sometime soon, and if anyone is interested in one (or a few) of

Re: [Linux-zigbee-devel] nl802154 UAPI definitions

2014-04-06 Thread Phoebe Buckheister
On Mon, April 7, 2014 12:22 am, Ben Hutchings wrote: > On Mon, 2014-03-31 at 15:17 +0200, Phoebe Buckheister wrote: > [...] >> --- a/include/linux/nl802154.h >> +++ b/include/linux/nl802154.h >> @@ -132,7 +132,7 @@ enum { >> IEEE802154_ADD_IFACE

[Linux-zigbee-devel] [PATCH net-next v2 2/2] mac802154: make csma/cca parameters per-wpan

2014-03-31 Thread Phoebe Buckheister
devices with differing CSMA/CCA parameters, make these parameters MAC parameters instead. Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h| 2 +- include/net/ieee802154_netdev.h | 17 net/ieee802154/ieee802154.h | 2 +- net/ieee802154/netlink.c| 2 +- net

[Linux-zigbee-devel] [PATCH net-next v2] mac802154: fix multiple WPAN handling

2014-03-31 Thread Phoebe Buckheister
9109e17f7c3ace48629397b44db5ce06bf168644. Fixes a possible DoS bug and moves some netdev properties in mac802154 to the places they should have gone from the outset. Phoebe Buckheister (2): mac802154: allow only one WPAN to be up at any given time mac802154: make csma/cca parameters per-wpan include/linux

[Linux-zigbee-devel] [PATCH net-next v2 1/2] mac802154: allow only one WPAN to be up at any given time

2014-03-31 Thread Phoebe Buckheister
any process on the system that may call socket() and sendmsg(). Thus, allow only one WPAN per PHY to be up at once, just like mac80211 does for managed devices. Signed-off-by: Phoebe Buckheister --- net/mac802154/ieee802154_dev.c | 25 + net/mac802154/mac802154.h | 1

[Linux-zigbee-devel] mac802154: make multiple WPAN handling sensible

2014-03-31 Thread Phoebe Buckheister
PHY. This patch set fixes both, allowing only one WPAN device to be up at any given time, and making WPAN-related settings per-WPAN instead of per-PHY. --- Phoebe Buckheister (2): mac802154: allow only one WPAN to be up at any given time mac802154: make csma/cca parameters per-wpan

[Linux-zigbee-devel] [PATCH net-next 1/2] mac802154: allow only one WPAN to be up at any given time

2014-03-31 Thread Phoebe Buckheister
any process on the system that may call socket() and sendmsg(). Thus, allow only one WPAN per PHY to be up at once, just like mac80211 does for managed devices. Signed-off-by: Phoebe Buckheister --- net/mac802154/ieee802154_dev.c | 25 + net/mac802154/mac802154.h

[Linux-zigbee-devel] [PATCH net-next 2/2] mac802154: make csma/cca parameters per-wpan

2014-03-31 Thread Phoebe Buckheister
devices with differing CSMA/CCA parameters, make these parameters MAC parameters instead. Signed-off-by: Phoebe Buckheister --- include/linux/nl802154.h|2 +- include/net/ieee802154_netdev.h | 17 net/ieee802154/ieee802154.h |2 +- net/ieee802154/netlink.c|2

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Phoebe Buckheister
> Thanks again for the detailed response. To give some context our > powerline PHY isn't like any in the 802.15.4 spec and we are hoping to > utilise just the MAC. I need to check with the system guys but I think > we can only multiplex multiple WPANs in time not frequency. We would > also need t

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Phoebe Buckheister
> Hi Phoebe, > > Thank you for the swift response it has given my a lot to think about. > I remember the discussion and like you I was in favour of removing the > slave list. But as chance would have it I think we may actually need it > now or some other method of multiple WPANs per PHY. In that

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Phoebe Buckheister
> Is it possible for a device to co-ordinate more than 1 WPAN on the same > PHY, beacon enabled or beaconless? > If so is it possible to bridge or route from one WPAN to another within > a device over the same PHY? > Can a slave join more than one WPAN, again using the same PHY? Theoretically yes

[Linux-zigbee-devel] [PATCH net-next v2] ieee802154: properly unshare skbs in ieee802154 *_rcv functions

2014-03-17 Thread Phoebe Buckheister
explicit call. Signed-off-by: Phoebe Buckheister --- net/ieee802154/6lowpan_rtnl.c | 29 + net/ieee802154/dgram.c| 4 net/ieee802154/raw.c | 4 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/net/ieee802154/6lowpan_rtnl.c b

Re: [Linux-zigbee-devel] [PATCH net-next] ieee802154: properly unshare skbs in ieee802154 *_rcv functions

2014-03-17 Thread Phoebe Buckheister
On Mon, March 17, 2014 5:21 pm, Alexander Aring wrote: > Hi Phoebe, > > looks interesting but doens't apply on current net-next for me. :( > I didn't test it yet. Indeed, I've unwittingly tested whether it applies against a stale version of net-next. Sorry for the inconvenience.

[Linux-zigbee-devel] [PATCH net-next] ieee802154: properly unshare skbs in ieee802154 *_rcv functions

2014-03-17 Thread Phoebe Buckheister
explicit call. Signed-off-by: Phoebe Buckheister --- net/ieee802154/6lowpan_rtnl.c | 29 + net/ieee802154/dgram.c|3 +++ net/ieee802154/raw.c |3 +++ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/net/ieee802154/6lowpan_rtnl.c

Re: [Linux-zigbee-devel] [PATCH net-next 4/8] ieee802154: add header structs with endiannes and operations

2014-03-14 Thread Phoebe Buckheister
On Fri, March 14, 2014 11:11 pm, Martin Townsend wrote: > On 14/03/14 21:29, Phoebe Buckheister wrote: >> They would look contiguous, but they won't be contiguous in memory. >> Declarig the reserved field as u8:3 will cause the allocator to move >> that >> thr

Re: [Linux-zigbee-devel] [PATCH net-next 4/8] ieee802154: add header structs with endiannes and operations

2014-03-14 Thread Phoebe Buckheister
On Fri, March 14, 2014 10:07 pm, Martin Townsend wrote: > See below […] >> +struct ieee802154_hdr_fc { >> +#if defined(__LITTLE_ENDIAN_BITFIELD) >> +u16 type:3, >> +security_enabled:1, >> +frame_pending:1, >> +ack_request:1, >> +intra_pan:1, >> +reserved:

Re: [Linux-zigbee-devel] [PATCH net-next 3/8] ieee802154: enforce consistent endianness in the 802.15.4 stack

2014-03-14 Thread Phoebe Buckheister
On Fri, March 14, 2014 9:36 pm, Martin Townsend wrote: > Hi Phoebe, > > To help me review this series and also so I can update my driver could > you give me some background on endianess in the stack, ie what should be > little endian, why it should be little endian etc. Sorry for being a > pain, I'

[Linux-zigbee-devel] [PATCH net-next v2 7/8] 6lowpan: move lowpan frag_info out of 802.15.4 headers

2014-03-14 Thread Phoebe Buckheister
Fragmentation and reassembly information for 6lowpan is independent from the 802.15.4 stack and used only by the 6lowpan reassembly process. Move the ieee802154_frag_info struct to a private are, it needn't be in the 802.15.4 skb control block. Signed-off-by: Phoebe Buckheister --- includ

[Linux-zigbee-devel] [PATCH net-next v2 0/8] ieee802154: fix endianness and header handling

2014-03-14 Thread Phoebe Buckheister
that already exists? [1] http://sourceforge.net/apps/trac/linux-zigbee/wiki [2] http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn/ --- Phoebe Buckheister (8): ieee802154: rename struct ieee802154_addr to *_sa ieee802154: add address struct with proper endiannes and some opera

[Linux-zigbee-devel] [PATCH net-next v2 5/8] mac802154: use header operations to create/parse headers

2014-03-14 Thread Phoebe Buckheister
gone unnoticed until now: * 802.15.4 dgram sockets would return a slightly incorrect value for the SIOCINQ ioctl * mac802154 would not drop frames with the "security enabled" bit set, even though it does not support security, in violation of the standard Signed-off-

[Linux-zigbee-devel] [PATCH net-next v2 3/8] ieee802154: enforce consistent endianness in the 802.15.4 stack

2014-03-14 Thread Phoebe Buckheister
all other fields (such as address filters, operation parameters and the likes). Signed-off-by: Phoebe Buckheister --- drivers/net/ieee802154/at86rf230.c | 25 +++--- drivers/net/ieee802154/fakehard.c | 14 ++--- drivers/net/ieee802154/mrf24j40.c | 17

[Linux-zigbee-devel] [PATCH net-next v2 2/8] ieee802154: add address struct with proper endiannes and some operations

2014-03-14 Thread Phoebe Buckheister
], is intentional. Signed-off-by: Phoebe Buckheister --- include/net/ieee802154_netdev.h | 72 + 1 file changed, 72 insertions(+) diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index 53937cd..86d5d50 100644 --- a/include/net

[Linux-zigbee-devel] [PATCH net-next v2 4/8] ieee802154: add header structs with endiannes and operations

2014-03-14 Thread Phoebe Buckheister
ul, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Written by: + * Phoebe Buckheister + */ + +#include +#include +#include + +static int

[Linux-zigbee-devel] [PATCH net-next v2 8/8] ieee802154: add proper length checks to header creations

2014-03-14 Thread Phoebe Buckheister
of -EINVAL. Signed-off-by: Phoebe Buckheister --- net/ieee802154/6lowpan_rtnl.c | 2 +- net/ieee802154/dgram.c| 2 +- net/mac802154/wpan.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index

[Linux-zigbee-devel] [PATCH net-next v2 1/8] ieee802154: rename struct ieee802154_addr to *_sa

2014-03-14 Thread Phoebe Buckheister
address this; it is only preparatory. Signed-off-by: Phoebe Buckheister --- drivers/net/ieee802154/fakehard.c | 14 +++--- include/net/af_ieee802154.h | 4 ++-- include/net/ieee802154_netdev.h | 12 ++-- include/net/nl802154.h| 6 +++--- net/ieee802154

[Linux-zigbee-devel] [PATCH net-next v2 6/8] ieee802154: use ieee802154_addr instead of *_sa variants

2014-03-14 Thread Phoebe Buckheister
Change all internal uses of ieee802154_addr_sa to ieee802154_addr, except for those instances that communicate directly with userspace. Signed-off-by: Phoebe Buckheister --- drivers/net/ieee802154/fakehard.c | 8 +-- include/net/ieee802154_netdev.h | 12 ++-- include/net/nl802154.h

Re: [Linux-zigbee-devel] [PATCH net-next 1/8] ieee802154: rename struct ieee802154_addr to *_sa

2014-03-14 Thread Phoebe Buckheister
On Fri, March 14, 2014 8:53 pm, Martin Townsend wrote: > Thanks Phoebe, I'll probably get shot down for proposing this as _sa is > standard nomenclature but couldn't we use ieee802154_saddr or > iee802154_sockaddr to avoid the unfortunate similarity with source > address and avoid statements like t

Re: [Linux-zigbee-devel] [PATCH net-next 2/8] ieee802154: add address struct with proper endiannes and some operations

2014-03-14 Thread Phoebe Buckheister
On Fri, 14 Mar 2014 16:00:39 + David Laight wrote: > From: Phoebe Buckheister > > Add a replacement ieee802154_addr struct with proper endianness on > > fields. Short address fields are stored as __le16 as on the network, > > extended (EUI64) addresses are __le64 a

Re: [Linux-zigbee-devel] [PATCH net-next 1/8] ieee802154: rename struct ieee802154_addr to *_sa

2014-03-14 Thread Phoebe Buckheister
On Fri, 14 Mar 2014 16:11:52 + Martin Townsend wrote: > Hi Phoebe, > > Out of interest what does the _sa stand for? sockaddr, since it came from the sockaddr struct and my goal was to use it only there. > Many thanks, > Martin. > --

  1   2   3   >