Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966247AbcKLCSl (ORCPT ); Fri, 11 Nov 2016 21:18:41 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:48126 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965742AbcKLCSj (ORCPT ); Fri, 11 Nov 2016 21:18:39 -0500 MIME-Version: 1.0 In-Reply-To: <31e050e2-0499-a77e-f698-86e58ad2fa6b@cumulusnetworks.com> References: <31e050e2-0499-a77e-f698-86e58ad2fa6b@cumulusnetworks.com> From: "Jason A. Donenfeld" Date: Sat, 12 Nov 2016 03:18:31 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Source address fib invalidation on IPv6 To: David Ahern Cc: Netdev , WireGuard mailing list , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 739 Lines: 15 Hi David, On Fri, Nov 11, 2016 at 11:14 PM, David Ahern wrote: > What do you mean by 'valid dst'? ipv6 returns net->ipv6.ip6_null_entry on lookup failures so yes dst is non-NULL but that does not mean the lookup succeeded. What I mean is that it returns an ordinary dst, as if that souce address _hadn't_ been removed from the interface, even though I just removed it. Is this buggy behavior? If so, let me know and I'll try to track it down. The expected behavior, as far as I can see, would be the same that ip_route_output_flow has -- returning -EINVAL when the saddr isn't valid. At the moment, when the saddr is invalid, ipv6_stub->ipv6_dst_lookup returns 0 and &dst contains a real entry. Regards, Jason