From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jason A. Donenfeld" Subject: Re: Source address fib invalidation on IPv6 Date: Sat, 12 Nov 2016 03:18:31 +0100 Message-ID: References: <31e050e2-0499-a77e-f698-86e58ad2fa6b@cumulusnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Netdev , LKML , WireGuard mailing list To: David Ahern Return-path: In-Reply-To: <31e050e2-0499-a77e-f698-86e58ad2fa6b@cumulusnetworks.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" List-Id: netdev.vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Jason@zx2c4.com Received: from frisell.zx2c4.com (frisell.zx2c4.com [192.95.5.64]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 34431524 for ; Sat, 12 Nov 2016 02:16:18 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id e94c0758 for ; Sat, 12 Nov 2016 02:16:18 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id ee28b886 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Sat, 12 Nov 2016 02:16:17 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id o141so24236822lff.1 for ; Fri, 11 Nov 2016 18:18:34 -0800 (PST) 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 Message-ID: To: David Ahern Content-Type: text/plain; charset=UTF-8 Cc: Netdev , LKML , WireGuard mailing list Subject: Re: [WireGuard] Source address fib invalidation on IPv6 List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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