瀏覽代碼

6lowpan: next header is not properly set upon decompression of a UDP header.

This causes a drop of the UDP packet.

Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tony Cheneau 12 年之前
父節點
當前提交
f5c20f58d9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      net/ieee802154/6lowpan.c

+ 3 - 1
net/ieee802154/6lowpan.c

@@ -918,9 +918,11 @@ lowpan_process_data(struct sk_buff *skb)
 	}
 
 	/* UDP data uncompression */
-	if (iphc0 & LOWPAN_IPHC_NH_C)
+	if (iphc0 & LOWPAN_IPHC_NH_C) {
 		if (lowpan_uncompress_udp_header(skb))
 			goto drop;
+		hdr.nexthdr = UIP_PROTO_UDP;
+	}
 
 	/* Not fragmented package */
 	hdr.payload_len = htons(skb->len);