Fixes for 6lowpan.
I'm sorry about the other two emails that just went out with the same
subject. One day I'm going to start getting these right on the first try.
Alan Ott (2):
6lowpan: Make a copy of skb's delivered to 6lowpan
6lowpan: handle NETDEV_UNREGISTER event
net/ieee802154/6lowpan.c | 53 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 45 insertions(+), 8 deletions(-)
Since lowpan_process_data() modifies the skb (by calling skb_pull()), we
need our own copy so that it doesn't affect the data received by other
protcols (in this case, af_ieee802154).
Signed-off-by: Alan Ott <redacted>
---
net/ieee802154/6lowpan.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
@@ -1144,7 +1146,12 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,caseLOWPAN_DISPATCH_IPHC:/* ipv6 datagram */caseLOWPAN_DISPATCH_FRAG1:/* first fragment header */caseLOWPAN_DISPATCH_FRAGN:/* next fragments headers */-lowpan_process_data(skb);+local_skb=skb_copy(skb,GFP_ATOMIC);+if(!local_skb)+gotodrop;+lowpan_process_data(local_skb);++kfree_skb(skb);break;default:break;
--
1.7.0.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
From: Eric Dumazet <hidden> Date: 2012-08-31 07:01:31
On Wed, 2012-08-29 at 22:39 -0400, Alan Ott wrote:
quoted hunk
Since lowpan_process_data() modifies the skb (by calling skb_pull()), we
need our own copy so that it doesn't affect the data received by other
protcols (in this case, af_ieee802154).
Signed-off-by: Alan Ott <redacted>
---
net/ieee802154/6lowpan.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
On Wed, 2012-08-29 at 22:39 -0400, Alan Ott wrote:
quoted
Since lowpan_process_data() modifies the skb (by calling skb_pull()), we
need our own copy so that it doesn't affect the data received by other
protcols (in this case, af_ieee802154).
Signed-off-by: Alan Ott <redacted>
---
net/ieee802154/6lowpan.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
@@ -1144,7 +1146,12 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,caseLOWPAN_DISPATCH_IPHC:/* ipv6 datagram */caseLOWPAN_DISPATCH_FRAG1:/* first fragment header */caseLOWPAN_DISPATCH_FRAGN:/* next fragments headers */-lowpan_process_data(skb);+local_skb=skb_copy(skb,GFP_ATOMIC);+if(!local_skb)+gotodrop;+lowpan_process_data(local_skb);++kfree_skb(skb);break;default:break;
Its not clear to me why skb_copy() is needed here.
quoted
From patch description, I would say skb_clone() would be enough (and
faster) ?
You're probably right. I'll check it out. Thanks.
Alan.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Before, it was impossible to remove a wpan device which had lowpan
attached to it.
Signed-off-by: Alan Ott <redacted>
---
net/ieee802154/6lowpan.c | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
@@ -1258,6 +1280,12 @@ static int __init lowpan_init_module(void)gotoout;dev_add_pack(&lowpan_packet_type);++err=register_netdevice_notifier(&lowpan_dev_notifier);+if(err<0){+dev_remove_pack(&lowpan_packet_type);+lowpan_netlink_fini();+}out:returnerr;}
@@ -1270,6 +1298,8 @@ static void __exit lowpan_cleanup_module(void)dev_remove_pack(&lowpan_packet_type);+unregister_netdevice_notifier(&lowpan_dev_notifier);+/* Now 6lowpan packet_type is removed, so no new fragments are*expectedonRX,thereforethat'sthetimetocleanincomplete*fragments.
--
1.7.0.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
v3 of this patch changes skb_copy() to skb_clone() in patch #1 at the
recommendation of Eric Dumazet
Alan Ott (2):
6lowpan: Make a copy of skb's delivered to 6lowpan
6lowpan: handle NETDEV_UNREGISTER event
net/ieee802154/6lowpan.c | 53 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 45 insertions(+), 8 deletions(-)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
From: David Miller <davem@davemloft.net> Date: 2012-09-02 02:49:02
From: Alan Ott <redacted>
Date: Sat, 1 Sep 2012 11:57:05 -0400
v3 of this patch changes skb_copy() to skb_clone() in patch #1 at the
recommendation of Eric Dumazet
Alan Ott (2):
6lowpan: Make a copy of skb's delivered to 6lowpan
6lowpan: handle NETDEV_UNREGISTER event
Since lowpan_process_data() modifies the skb (by calling skb_pull()), we
need our own copy so that it doesn't affect the data received by other
protcols (in this case, af_ieee802154).
Signed-off-by: Alan Ott <redacted>
---
net/ieee802154/6lowpan.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
@@ -1144,7 +1146,12 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,caseLOWPAN_DISPATCH_IPHC:/* ipv6 datagram */caseLOWPAN_DISPATCH_FRAG1:/* first fragment header */caseLOWPAN_DISPATCH_FRAGN:/* next fragments headers */-lowpan_process_data(skb);+local_skb=skb_clone(skb,GFP_ATOMIC);+if(!local_skb)+gotodrop;+lowpan_process_data(local_skb);++kfree_skb(skb);break;default:break;
--
1.7.0.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Before, it was impossible to remove a wpan device which had lowpan
attached to it.
Signed-off-by: Alan Ott <redacted>
---
net/ieee802154/6lowpan.c | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
@@ -1258,6 +1280,12 @@ static int __init lowpan_init_module(void)gotoout;dev_add_pack(&lowpan_packet_type);++err=register_netdevice_notifier(&lowpan_dev_notifier);+if(err<0){+dev_remove_pack(&lowpan_packet_type);+lowpan_netlink_fini();+}out:returnerr;}
@@ -1270,6 +1298,8 @@ static void __exit lowpan_cleanup_module(void)dev_remove_pack(&lowpan_packet_type);+unregister_netdevice_notifier(&lowpan_dev_notifier);+/* Now 6lowpan packet_type is removed, so no new fragments are*expectedonRX,thereforethat'sthetimetocleanincomplete*fragments.
--
1.7.0.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/