[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1356702410-32293-1-git-send-email-stephan.gatzka@gmail.com>
Date: Fri, 28 Dec 2012 14:46:50 +0100
From: Stephan Gatzka <stephan.gatzka@...il.com>
To: netdev@...r.kernel.org
Cc: yoshfuji@...ux-ipv6.org, Stephan Gatzka <stephan.gatzka@...il.com>
Subject: [Patch RFC] ndisc: Fix skb allocation size for link layer options.
Signed-off-by: Stephan Gatzka <stephan.gatzka@...il.com>
---
net/ipv6/ndisc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 6574175..b12b94c 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -392,7 +392,7 @@ static struct sk_buff *ndisc_build_skb(struct net_device *dev,
len = sizeof(struct icmp6hdr) + (target ? sizeof(*target) : 0);
if (llinfo)
- len += ndisc_opt_addr_space(dev);
+ len += sizeof(struct nd_opt_hdr) + ndisc_opt_addr_space(dev);
skb = sock_alloc_send_skb(sk,
(MAX_HEADER + sizeof(struct ipv6hdr) +
@@ -1424,7 +1424,8 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
memcpy(ha_buf, neigh->ha, dev->addr_len);
read_unlock_bh(&neigh->lock);
ha = ha_buf;
- len += ndisc_opt_addr_space(dev);
+ len += sizeof(struct nd_opt_hdr) +
+ ndisc_opt_addr_space(dev);
} else
read_unlock_bh(&neigh->lock);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists