From bf513fd6fc609590b7835c0dba624ccb9f8f9214 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 13 Oct 2015 13:42:56 +0200 Subject: 6lowpan: introduce LOWPAN_IPHC_MAX_HC_BUF_LEN This patch introduces the LOWPAN_IPHC_MAX_HC_BUF_LEN define which represent the worst-case supported IPHC buffer length. It's used to allocate the stack buffer space for creating the IPHC header. Signed-off-by: Alexander Aring Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann --- net/6lowpan/iphc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/6lowpan') diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c index 78c8a49..dd5f27d 100644 --- a/net/6lowpan/iphc.c +++ b/net/6lowpan/iphc.c @@ -429,7 +429,7 @@ int lowpan_header_compress(struct sk_buff *skb, struct net_device *dev, { u8 tmp, iphc0, iphc1, *hc_ptr; struct ipv6hdr *hdr; - u8 head[100] = {}; + u8 head[LOWPAN_IPHC_MAX_HC_BUF_LEN] = {}; int ret, addr_type; if (type != ETH_P_IPV6) -- cgit v1.1