Skip to content

ieee802154: 6lowpan: fix transmit address handling

Eric Dumazet netdev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ieee802154: 6lowpan: look up the neighbour short address in lowpan_xmit()net/ieee802154/6lowpan/tx.c+36 -260 replies
2/26lowpan: fix warning in lowpan_compress_addr_64()net/ieee802154/6lowpan/6lowpan_i.h net/ieee802154/6lowpan/core.c net/ieee802154/6lowpan/tx.c+42 -490 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 net 0/2] ieee802154: 6lowpan: fix transmit address handling

SEFCOM lab reported a warning in lowpan_compress_addr_64(), triggered by an AF_PACKET socket sending on a lowpan device.

lowpan_header_create() stores the 802.15.4 addresses in the skb headroom, where lowpan_xmit() cannot tell if they are valid. It also reads the IPv6 header before AF_PACKET SOCK_DGRAM sockets have copied it.

Patch 1 moves the neighbour short address lookup to lowpan_xmit().

Patch 2 pushes the destination address as an 8 byte pseudo header, like IPoIB, and lets lowpan_xmit() compute the 802.15.4 addresses.

v2: move skb_reset_network_header() from patch 1 to patch 2.
In patch 1, hard_header_len is still 40, and the reset left a stale transport header for AF_PACKET SOCK_RAW packets (Sashiko).
The code after patch 2 is unchanged.
v1: https://lore.kernel.org/netdev/[email protected]/

Eric Dumazet (2):
ieee802154: 6lowpan: look up the neighbour short address in
lowpan_xmit()
6lowpan: fix warning in lowpan_compress_addr_64()

 net/ieee802154/6lowpan/6lowpan_i.h |   5 ++
 net/ieee802154/6lowpan/core.c      |   4 +-
 net/ieee802154/6lowpan/tx.c        | 128 ++++++++++++++---------------
 3 files changed, 70 insertions(+), 67 deletions(-)
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog