All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahide NAKAMURA <nakam@linux-ipv6.org>
To: davem@davemloft.net
Cc: yoshfuji@linux-ipv6.org, netdev@vger.kernel.org,
	Masahide NAKAMURA <nakam@linux-ipv6.org>
Subject: [PATCH 2/2] [IPV6] RAW: Add checksum default defines for mobility header.
Date: Tue,  5 Dec 2006 19:03:27 +0900	[thread overview]
Message-ID: <11653130071739-git-send-email-nakam@linux-ipv6.org> (raw)

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 <nakam@linux-ipv6.org>
---
 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


             reply	other threads:[~2006-12-05 10:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05 10:03 Masahide NAKAMURA [this message]
2006-12-05 11:02 ` [PATCH 2/2] [IPV6] RAW: Add checksum default defines for mobility header YOSHIFUJI Hideaki / 吉藤英明
2006-12-05 15:04   ` Brian Haley
2006-12-05 15:28     ` YOSHIFUJI Hideaki / 吉藤英明
2006-12-05 21:49   ` David Miller
2006-12-11  6:50   ` David Miller
2006-12-27  2:14     ` YOSHIFUJI Hideaki / 吉藤英明
2006-12-27  4:57       ` Masahide NAKAMURA
2006-12-27  5:44         ` Noriaki TAKAMIYA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11653130071739-git-send-email-nakam@linux-ipv6.org \
    --to=nakam@linux-ipv6.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.