Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751803AbbEIT7i (ORCPT ); Sat, 9 May 2015 15:59:38 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:45014 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbbEIT7g (ORCPT ); Sat, 9 May 2015 15:59:36 -0400 Date: Sat, 09 May 2015 15:59:33 -0400 (EDT) Message-Id: <20150509.155933.1142748159005050614.davem@davemloft.net> To: markus.stenberg@iki.fi Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ipv6: Fixed source specific default route handling. From: David Miller In-Reply-To: <7922B483-7EA7-4B50-BF1C-7681EB7CC454@iki.fi> References: <7922B483-7EA7-4B50-BF1C-7681EB7CC454@iki.fi> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 09 May 2015 12:59:35 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 26 From: Markus Stenberg Date: Tue, 5 May 2015 13:36:59 +0300 > If there are only IPv6 source specific default routes present, the > host gets -ENETUNREACH on e.g. connect() because ip6_dst_lookup_tail > calls ip6_route_output first, and given source address any, it fails, > and ip6_route_get_saddr is never called. > > The change is to use the ip6_route_get_saddr, even if the initial > ip6_route_output fails, and then doing ip6_route_output _again_ after > we have appropriate source address available. > > Note that this is '99% fix' to the problem; a correct fix would be to > do route lookups only within addrconf.c when picking a source address, > and never call ip6_route_output before source address has been > populated. > > Signed-off-by: Markus Stenberg Applied, but would like to see the more complete fix at some point. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/