diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-10-13 07:42:56 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-10-20 18:49:24 -0400 |
commit | bf513fd6fc609590b7835c0dba624ccb9f8f9214 (patch) | |
tree | d67d1ce786f536b031346e84e1217e59a4ae9b4e /net/6lowpan | |
parent | cefdb801c80736017b5a0d97a4a9f816d5a98fc4 (diff) |
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 <alex.aring@gmail.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/6lowpan')
-rw-r--r-- | net/6lowpan/iphc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c index 78c8a495b571..dd5f27d5358e 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, | |||
429 | { | 429 | { |
430 | u8 tmp, iphc0, iphc1, *hc_ptr; | 430 | u8 tmp, iphc0, iphc1, *hc_ptr; |
431 | struct ipv6hdr *hdr; | 431 | struct ipv6hdr *hdr; |
432 | u8 head[100] = {}; | 432 | u8 head[LOWPAN_IPHC_MAX_HC_BUF_LEN] = {}; |
433 | int ret, addr_type; | 433 | int ret, addr_type; |
434 | 434 | ||
435 | if (type != ETH_P_IPV6) | 435 | if (type != ETH_P_IPV6) |