[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50D04BDD.3070203@linux-ipv6.org>
Date: Tue, 18 Dec 2012 19:56:29 +0900
From: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
To: davem@...emloft.net, netdev@...r.kernel.org
CC: yoshfuji@...ux-ipv6.org
Subject: [GIT PULL net-next 17/17] ndisc: Use return value of __skb_put(),
instead of icmp6_hdr().
It is safe to use __skb_put() here and it returns buffer for
ICMPv6 header. Let's use it.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
---
net/ipv6/ndisc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index e614388..232daea 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1469,8 +1469,7 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
if (!buff)
goto release;
- skb_put(buff, sizeof(struct red_msg));
- msg = (struct red_msg *)icmp6_hdr(buff);
+ msg = (struct red_msg *)__skb_put(buff, sizeof(struct red_msg));
*msg = (struct red_msg) {
.icmph = {
.icmp6_type = NDISC_REDIRECT,
--
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