All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, hannes@stressinduktion.org
Subject: [PATCH v2 5/6] ipv6: modify the err to 0 when dealing with NDISC_REDIRECT
Date: Fri, 13 Sep 2013 11:02:23 +0800	[thread overview]
Message-ID: <5232803F.5010108@cn.fujitsu.com> (raw)
In-Reply-To: <52327F00.4040802@cn.fujitsu.com>

From: Duan Jiong <duanj.fnst@cn.fujitsu.com>

when dealing with redirect message, the err shoud
be assigned to 0, not EPROTO. And del the statements
for updating route.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
 net/ipv6/icmp.c | 3 +++
 net/ipv6/raw.c  | 3 +--
 net/ipv6/udp.c  | 2 --
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 4bde43c..6bcedcc 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -975,6 +975,9 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)
 	case ICMPV6_TIME_EXCEED:
 		*err = EHOSTUNREACH;
 		break;
+	case NDISC_REDIRECT:
+		*err = 0;
+		break;
 	}
 
 	return fatal;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 58916bb..baf86b8 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -335,8 +335,7 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb,
 		ip6_sk_update_pmtu(skb, sk, info);
 		harderr = (np->pmtudisc == IPV6_PMTUDISC_DO);
 	}
-	if (type == NDISC_REDIRECT)
-		ip6_sk_redirect(skb, sk);
+
 	if (np->recverr) {
 		u8 *payload = skb->data;
 		if (!inet->hdrincl)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index f405815..a40b392 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -525,8 +525,6 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 
 	if (type == ICMPV6_PKT_TOOBIG)
 		ip6_sk_update_pmtu(skb, sk, info);
-	if (type == NDISC_REDIRECT)
-		ip6_sk_redirect(skb, sk);
 
 	np = inet6_sk(sk);
 
-- 
1.8.3.1

  parent reply	other threads:[~2013-09-13  3:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13  2:57 [PATCH v2 0/6] ipv6: Do route updating for redirect in ndisc layer Duan Jiong
2013-09-13  2:58 ` [PATCH v2 1/6] ipv6: del the statements for updating route in (dccp|tcp|sctp)_v6_err Duan Jiong
2013-09-13 20:37   ` Hannes Frederic Sowa
2013-09-13 20:37     ` Hannes Frederic Sowa
2013-09-14  8:20     ` Daniel Borkmann
2013-09-14  8:20       ` Daniel Borkmann
2013-09-13  2:59 ` [PATCH v2 2/6] ipv6: just match on ICMPV6_PKT_TOOBIG in those err_handle Duan Jiong
2013-09-13  3:00 ` [PATCH v2 3/6] ipv6: del statements for dealing with NDISC_REDIRECT Duan Jiong
2013-09-13  3:01 ` [PATCH v2 4/6] ip6tnl: move route updating for redirect to ndisc layer Duan Jiong
2013-09-13  3:02 ` Duan Jiong [this message]
2013-09-13  3:03 ` [PATCH v2 6/6] ipv6: Do route updating for redirect in " Duan Jiong
2013-09-18  0:29   ` David Miller
2013-09-18  1:39     ` Hannes Frederic Sowa
2013-09-18  1:52       ` Duan Jiong
2013-09-18  4:13         ` Hannes Frederic Sowa
2013-09-18 11:57           ` Duan Jiong
2013-10-09  1:43           ` Hannes Frederic Sowa
2013-10-09  7:00             ` Duan Jiong

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=5232803F.5010108@cn.fujitsu.com \
    --to=duanj.fnst@cn.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.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.