From patchwork Thu Sep 12 10:49:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duan Jiong X-Patchwork-Id: 274501 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DF8BA2C0207 for ; Thu, 12 Sep 2013 20:50:23 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753390Ab3ILKuU (ORCPT ); Thu, 12 Sep 2013 06:50:20 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:62552 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751514Ab3ILKuS (ORCPT ); Thu, 12 Sep 2013 06:50:18 -0400 X-IronPort-AV: E=Sophos;i="4.90,890,1371052800"; d="scan'208";a="8504002" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 12 Sep 2013 18:47:07 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r8CAoGo0028107; Thu, 12 Sep 2013 18:50:16 +0800 Received: from [10.167.225.86] ([10.167.225.86]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013091218475529-1456713 ; Thu, 12 Sep 2013 18:47:55 +0800 Message-ID: <52319C34.8000902@cn.fujitsu.com> Date: Thu, 12 Sep 2013 18:49:24 +0800 From: Duan Jiong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130612 Thunderbird/17.0.6 MIME-Version: 1.0 To: davem@davemloft.net CC: netdev@vger.kernel.org, hannes@stressinduktion.org Subject: [PATCH 06/11] ip6tnl: move route updating for redirect to ndisc layer References: <52319A6E.6090503@cn.fujitsu.com> In-Reply-To: <52319A6E.6090503@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/09/12 18:47:55, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/09/12 18:47:55, Serialize complete at 2013/09/12 18:47:55 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Duan Jiong In rfc2473, we can know that the tunnel ICMP redirect message should not be reported to the source of the original packet, so after calling ip6_tnl_err(), the rel_msg is set to 0 in function ip4ip6_err(), and the redirect will never be handled. In order to deal with this, we move route updating for redirect to ndisc layer. Signed-off-by: Duan Jiong --- net/ipv6/ip6_tunnel.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 61355f7..3ea834b 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -576,9 +576,6 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, rel_type = ICMP_DEST_UNREACH; rel_code = ICMP_FRAG_NEEDED; break; - case NDISC_REDIRECT: - rel_type = ICMP_REDIRECT; - rel_code = ICMP_REDIR_HOST; default: return 0; } @@ -637,8 +634,6 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), NULL, skb2, rel_info); } - if (rel_type == ICMP_REDIRECT) - skb_dst(skb2)->ops->redirect(skb_dst(skb2), NULL, skb2); icmp_send(skb2, rel_type, rel_code, htonl(rel_info));