From ec1a21910c1cfa7c760ea76ab421d31dd4f83421 Mon Sep 17 00:00:00 2001 From: Hideaki Yoshifuji <yoshfuji@linux-ipv6.org> Date: Fri, 21 May 2004 12:33:44 +0900 Subject: [PATCH] [IPV6] put appropriate checksum for rawv6 sockets even if it was not initialized. --- net/ipv6/raw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ccc4c719c04a..24b72752a41f 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -481,6 +481,10 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r } } + /* in case cksum was not initialized */ + if (unlikely(*csum)) + tmp_csum = csum_sub(tmp_csum, *csum); + *csum = csum_ipv6_magic(&fl->fl6_src, &fl->fl6_dst, len, fl->proto, tmp_csum); -- 2.30.9