From patchwork Wed May 26 17:01:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 53648 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 B6017B7D16 for ; Thu, 27 May 2010 03:20:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933860Ab0EZRUw (ORCPT ); Wed, 26 May 2010 13:20:52 -0400 Received: from copper.chdir.org ([88.191.97.87]:55796 "EHLO copper.chdir.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933199Ab0EZRUv (ORCPT ); Wed, 26 May 2010 13:20:51 -0400 X-Greylist: delayed 1121 seconds by postgrey-1.27 at vger.kernel.org; Wed, 26 May 2010 13:20:51 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natisbad.org; s=mail; h=From:To:Cc:Subject:Date:Message-ID: MIME-Version:Content-Type; bh=Tgn6E5FtJP1ZBisQntUgwt8m5EP1kJRTk+ qF/NnNFAY=; b=UWN90VkccXV2o57s5inCsrr8JGM2A25JTjvvN/DpUHYPS6fHRp j0WITsu8Sicg10z1sGt5B8MnmN9snk8zWc4IfOuYWf5ql2WGCMD2ii0J3zGVOr7k 8Ln+aXyO23nQlzWHAUlwN6AA1DY1NBLbNKpZYJTVBBjd9OC7Xc5DAX1Xk= Received: from [2001:7a8:78df:2:20d:93ff:fe55:8f79] (helo=small.ssi.corp) by copper.chdir.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OHJza-0002od-5d; Wed, 26 May 2010 19:02:06 +0200 X-Hashcash: 1:20:100526:davem@davemloft.net::G2t7ph65yIeD3/nO:00000000000000000000000000000000000000000035ib X-Hashcash: 1:20:100526:yoshfuji@linux-ipv6.org::DMJWlC5gi6AKr64j:000000000000000000000000000000000000000Cyu X-Hashcash: 1:20:100526:jolsa@redhat.com::phk4iY48zSR5dqyJ:08wIt X-Hashcash: 1:20:100526:scott.otto@alcatel-lucent.com::E3em4cr/7Mw6lbmB:000000000000000000000000000000003BVp X-Hashcash: 1:20:100526:netdev@vger.kernel.org::OTitq0uuecPVXrd+:0000000000000000000000000000000000000001TsT From: arno@natisbad.org (Arnaud Ebalard) To: David Miller Cc: YOSHIFUJI Hideaki / =?utf-8?B?5ZCJ6Jek6Iux5piO?= , Jiri Olsa , Scott Otto , netdev@vger.kernel.org Subject: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0 X-PGP-Key-URL: http://natisbad.org/arno@natisbad.org.asc X-Fingerprint: D3A5 B68A 839B 38A5 815A 781B B77C 0748 A7AE 341B Date: Wed, 26 May 2010 19:01:55 +0200 Message-ID: <87zkzmppfg.fsf@small.ssi.corp> User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, I just updated my laptop's kernel to 2.6.34 (previously running .33 and configured to act as an IPsec/IKE-protected MIPv6 Mobile Node using racoon and umip): after rebooting on the new kernel, the transport mode SA protecting MIPv6 signaling traffic are missing. I bisected the issue down to f4f914b58019f0e50d521bbbadfaee260d766f95 (net: ipv6 bind to device issue) which was added after 2.6.34-rc5: Reverting the patch on a 2.6.34 gives me a working kernel. With MIPv6, the Home Address is bound to a tunnel interface but the routing/XFRM code will not always send packet via this virtual device (in fact, I would say never when IPsec is used for protecting signaling and data traffic): - Signaling traffic will be sent using a Care-of Address from another interface (with the addition of a Home Address Option in a Destination Option Header) - Data traffic (when protected by tunnel mode IPsec) will also be sent via another interface. I *suspect* that previous commit somehow changes the lose coupling between the address and the device to enforce a strict routing via associated interface. I will try and take a look at the code tomorrow to understand what really happens but if someone has ideas, I am interested. Cheers, a+ ps: I use the same working setup for all kernels since 2.6.28 --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c2438e8..05ebd78 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -815,7 +815,7 @@ struct dst_entry * ip6_route_output(struct net *net, struct sock *sk, { int flags = 0; - if (rt6_need_strict(&fl->fl6_dst)) + if (fl->oif || rt6_need_strict(&fl->fl6_dst)) flags |= RT6_LOOKUP_F_IFACE; if (!ipv6_addr_any(&fl->fl6_src))