diff options
author | Masahide NAKAMURA <nakam@linux-ipv6.org> | 2007-02-07 03:07:39 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-08 15:39:05 -0500 |
commit | f48d5ff1e44562a0ee87ce8ea3b798ce9d84370d (patch) | |
tree | 4b86cd593065f759e8de73231a67a1f95a02f234 /net/ipv6/raw.c | |
parent | cc63f70b8b410eb653449151821f6b8b9af6ca42 (diff) |
[IPV6] RAW: Add checksum default defines for MH.
Add checksum default defines for mobility header(MH) which
goes through raw socket. As the result kernel's behavior is
to handle MH checksum as default.
This patch also removes verifying inbound MH checksum at
mip6_mh_filter() since it did not consider user specified
checksum offset and was redundant check with raw socket code.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index f2e883c9368a..c2d8059e754e 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -1094,10 +1094,19 @@ static void rawv6_close(struct sock *sk, long timeout) | |||
1094 | 1094 | ||
1095 | static int rawv6_init_sk(struct sock *sk) | 1095 | static int rawv6_init_sk(struct sock *sk) |
1096 | { | 1096 | { |
1097 | if (inet_sk(sk)->num == IPPROTO_ICMPV6) { | 1097 | struct raw6_sock *rp = raw6_sk(sk); |
1098 | struct raw6_sock *rp = raw6_sk(sk); | 1098 | |
1099 | switch (inet_sk(sk)->num) { | ||
1100 | case IPPROTO_ICMPV6: | ||
1099 | rp->checksum = 1; | 1101 | rp->checksum = 1; |
1100 | rp->offset = 2; | 1102 | rp->offset = 2; |
1103 | break; | ||
1104 | case IPPROTO_MH: | ||
1105 | rp->checksum = 1; | ||
1106 | rp->offset = 4; | ||
1107 | break; | ||
1108 | default: | ||
1109 | break; | ||
1101 | } | 1110 | } |
1102 | return(0); | 1111 | return(0); |
1103 | } | 1112 | } |