Add checksum default defines for mobility header(MH).
As the result kernel's behavior is to handle MH checksum
as default.

Signed-off-by: Masahide NAKAMURA <[EMAIL PROTECTED]>
---
 net/ipv6/raw.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index aa1d420..389fa32 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1095,10 +1095,21 @@ static void rawv6_close(struct sock *sk,
 
 static int rawv6_init_sk(struct sock *sk)
 {
-       if (inet_sk(sk)->num == IPPROTO_ICMPV6) {
-               struct raw6_sock *rp = raw6_sk(sk);
+       struct raw6_sock *rp = raw6_sk(sk);
+
+       switch (inet_sk(sk)->num) {
+       case IPPROTO_ICMPV6:
                rp->checksum = 1;
                rp->offset   = 2;
+               break;
+#ifdef CONFIG_IPV6_MIP6
+       case IPPROTO_MH:
+               rp->checksum = 1;
+               rp->offset   = 4;
+               break;
+#endif
+       default:
+               break;
        }
        return(0);
 }
-- 
1.4.2

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to