summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-16 02:36:50 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:23:39 -0800
commitf6ab028804bdc580fe0915494dbf31f5ea473ca7 (patch)
tree4bf0fedcfaab7103682bc6209f196104fa9df8fb /net/ipv6
parentb51655b958dfb1176bfcf99466231fdbef8751ff (diff)
downloadop-kernel-dev-f6ab028804bdc580fe0915494dbf31f5ea473ca7.zip
op-kernel-dev-f6ab028804bdc580fe0915494dbf31f5ea473ca7.tar.gz
[NET]: Make mangling a checksum (0 -> 0xffff on the wire) explicit.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/raw.c4
-rw-r--r--net/ipv6/udp.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 9b21d67..c2e629d 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -536,8 +536,8 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
&fl->fl6_dst,
total_len, fl->proto, tmp_csum);
- if (tmp_csum == 0 && fl->proto == IPPROTO_UDP)
- tmp_csum = -1;
+ if (csum == 0 && fl->proto == IPPROTO_UDP)
+ csum = CSUM_MANGLED_0;
if (skb_store_bits(skb, offset, &csum, 2))
BUG();
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 0d22008..bb45b9b 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -536,7 +536,7 @@ static int udp_v6_push_pending_frames(struct sock *sk, struct udp_sock *up)
uh->check = csum_ipv6_magic(&fl->fl6_src, &fl->fl6_dst,
up->len, fl->proto, csum );
if (uh->check == 0)
- uh->check = -1;
+ uh->check = CSUM_MANGLED_0;
err = ip6_push_pending_frames(sk);
out:
OpenPOWER on IntegriCloud