<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/net/6lowpan/iphc.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/net/6lowpan/iphc.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/net/6lowpan/iphc.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2018-07-06T10:32:12Z</updated>
<entry>
<title>6lowpan: iphc: reset mac_header after decompress to fix panic</title>
<updated>2018-07-06T10:32:12Z</updated>
<author>
<name>Michael Scott</name>
<email>michael@opensourcefoundries.com</email>
</author>
<published>2018-06-19T23:44:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=03bc05e1a4972f73b4eb8907aa373369e825c252'/>
<id>urn:sha1:03bc05e1a4972f73b4eb8907aa373369e825c252</id>
<content type='text'>
After decompression of 6lowpan socket data, an IPv6 header is inserted
before the existing socket payload.  After this, we reset the
network_header value of the skb to account for the difference in payload
size from prior to decompression + the addition of the IPv6 header.

However, we fail to reset the mac_header value.

Leaving the mac_header value untouched here, can cause a calculation
error in net/packet/af_packet.c packet_rcv() function when an
AF_PACKET socket is opened in SOCK_RAW mode for use on a 6lowpan
interface.

On line 2088, the data pointer is moved backward by the value returned
from skb_mac_header().  If skb-&gt;data is adjusted so that it is before
the skb-&gt;head pointer (which can happen when an old value of mac_header
is left in place) the kernel generates a panic in net/core/skbuff.c
line 1717.

This panic can be generated by BLE 6lowpan interfaces (such as bt0) and
802.15.4 interfaces (such as lowpan0) as they both use the same 6lowpan
sources for compression and decompression.

Signed-off-by: Michael Scott &lt;michael@opensourcefoundries.com&gt;
Acked-by: Alexander Aring &lt;aring@mojatatu.com&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: Use netdev addr_len to determine lladdr len</title>
<updated>2017-04-12T20:02:36Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
<email>luiz.von.dentz@intel.com</email>
</author>
<published>2017-03-12T08:19:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fa09ae661fb5ab6f9826545d5128f2b7393bcf4a'/>
<id>urn:sha1:fa09ae661fb5ab6f9826545d5128f2b7393bcf4a</id>
<content type='text'>
This allow technologies such as Bluetooth to use its native lladdr which
is eui48 instead of eui64 which was expected by functions like
lowpan_header_decompress and lowpan_header_compress.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Reviewed-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: iphc: override l2 packet information</title>
<updated>2017-04-12T20:02:36Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2017-03-12T08:19:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=94e4a68039cc0c9d6e5cf708819cb8c7e770ebbf'/>
<id>urn:sha1:94e4a68039cc0c9d6e5cf708819cb8c7e770ebbf</id>
<content type='text'>
The skb-&gt;pkt_type need to be set by L2, but on 6LoWPAN there exists L2
e.g. BTLE which doesn't has multicast addressing. If it's a multicast or
not is detected by IPHC headers multicast bit. The IPv6 layer will
evaluate this pkt_type, so we force set this type while uncompressing.
Should be okay for 802.15.4 as well.

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Reviewed-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: add support for 802.15.4 short addr handling</title>
<updated>2016-06-16T03:41:24Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-06-15T19:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=eab560e58208730ec47e1e0461b8db1049d5d176'/>
<id>urn:sha1:eab560e58208730ec47e1e0461b8db1049d5d176</id>
<content type='text'>
This patch adds necessary handling for use the short address for
802.15.4 6lowpan. It contains support for IPHC address compression
and new matching algorithmn to decide which link layer address will be
used for 802.15.4 frame.

Reviewed-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>6lowpan: move mac802154 header</title>
<updated>2016-04-13T08:41:10Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-04-11T09:04:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=edc73417d8f33a1dd329295275168923298d9a7b'/>
<id>urn:sha1:edc73417d8f33a1dd329295275168923298d9a7b</id>
<content type='text'>
In case of link-layer specific handling for 802.15.4 we need to cast to
802.15.4 sepcific structures. Simple add this header when include the
6lowpan header.

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Reviewed-by: Stefan Schmidt&lt;stefan@osg.samsung.com&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: move eui64 uncompress function</title>
<updated>2016-04-13T08:41:10Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-04-11T09:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a5862f2aba4ba53d461450685a67ae252935ab94'/>
<id>urn:sha1:a5862f2aba4ba53d461450685a67ae252935ab94</id>
<content type='text'>
This function will be use in later functionality in other branches than
generic 6lowpan, so we move it to the global 6lowpan header.

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Reviewed-by: Stefan Schmidt&lt;stefan@osg.samsung.com&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: iphc: remove unnecessary zero data</title>
<updated>2016-04-13T08:41:09Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-04-11T09:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2bc068c3d6e1212d09c11169c699560747ef8c2b'/>
<id>urn:sha1:2bc068c3d6e1212d09c11169c699560747ef8c2b</id>
<content type='text'>
This patch removes unnecessary zero data for a stack variable.

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: iphc: rename add lowpan prefix</title>
<updated>2016-04-13T08:41:09Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-04-11T09:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=7115a968b75e9f81f6f8f45b2f97b1b43e024703'/>
<id>urn:sha1:7115a968b75e9f81f6f8f45b2f97b1b43e024703</id>
<content type='text'>
This patch adds a lowpan prefix to each functions which doesn't have
such prefix currently.

Reviewed-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: change naming for lowpan private data</title>
<updated>2016-04-13T08:41:09Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-04-11T09:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2e4d60cbcfc2d16a2a2efaae3fe08f2e457d59a1'/>
<id>urn:sha1:2e4d60cbcfc2d16a2a2efaae3fe08f2e457d59a1</id>
<content type='text'>
This patch changes the naming for interface private data for lowpan
intefaces. The current private data scheme is:

-------------------------------------------------
|    6LoWPAN Generic   |    LinkLayer 6LoWPAN   |
-------------------------------------------------

the current naming schemes are:

- 6LoWPAN Generic:
  - lowpan_priv
- LinkLayer 6LoWPAN:
  - BTLE
    - lowpan_dev
  - 802.15.4:
    - lowpan_dev_info

the new naming scheme with this patch will be:

- 6LoWPAN Generic:
  - lowpan_dev
- LinkLayer 6LoWPAN:
  - BTLE
    - lowpan_btle_dev
  - 802.15.4:
    - lowpan_802154_dev

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Reviewed-by: Stefan Schmidt&lt;stefan@osg.samsung.com&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>6lowpan: iphc: fix handling of link-local compression</title>
<updated>2016-04-08T17:28:13Z</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-03-16T12:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=feb2add3235ca81dc5cd5d975490c707a24c9889'/>
<id>urn:sha1:feb2add3235ca81dc5cd5d975490c707a24c9889</id>
<content type='text'>
This patch fixes handling in case of link-local address compression. A
IPv6 link-local address is defined as fe80::/10 prefix which is also
what ipv6_addr_type checks for link-local addresses.

But IPHC compression for link-local addresses are for fe80::/64 types
only. This patch adds additional checks for zero padded bits in case of
link-local address compression to match on a fe80::/64 address only.

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Reviewed-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
