[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120418.143057.38880609278817544.davem@davemloft.net>
Date: Wed, 18 Apr 2012 14:30:57 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: bcrl@...ck.org
Cc: netdev@...r.kernel.org, jchapman@...alix.com
Subject: Re: [PATCH 4/4] net/l2tp: add support for L2TP over IPv6 UDP encap
From: Benjamin LaHaise <bcrl@...ck.org>
Date: Wed, 18 Apr 2012 09:44:38 -0400
> +#if IS_ENABLED(CONFIG_IPV6)
> + if (sk->sk_family == PF_INET6) {
> + if (!uh->check) {
> + LIMIT_NETDEBUG(KERN_INFO "L2TP: IPv6: checksum is 0\n");
> + return 1;
> + }
> + if ((skb->ip_summed == CHECKSUM_COMPLETE) &&
> + !csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
> + &ipv6_hdr(skb)->daddr, ulen,
> + IPPROTO_UDP, skb->csum)) {
> + skb->ip_summed = CHECKSUM_UNNECESSARY;
> + return 0;
> + }
> + skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
> + &ipv6_hdr(skb)->daddr,
> + skb->len, IPPROTO_UDP,
> + 0));
Both the csum_ipv6_magic() calls should either use "ulen" or both
should use "skb->len".
--
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