From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: bruno@wolff.to Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 8a2fe01e for ; Tue, 28 Nov 2017 06:39:35 +0000 (UTC) Received: from wolff.to (wolff.to [98.103.208.27]) by krantz.zx2c4.com (ZX2C4 Mail Server) with SMTP id 83c6c089 for ; Tue, 28 Nov 2017 06:39:35 +0000 (UTC) Date: Tue, 28 Nov 2017 00:44:13 -0600 From: Bruno Wolff III To: "Jason A. Donenfeld" Subject: Re: Should I expect faster recovery after one side goes down Message-ID: <20171128064413.GA9218@wolff.to> References: <20171127094931.GA3104@wolff.to> <20171127134914.GA9392@wolff.to> <20171127173354.GA17685@wolff.to> <20171127182558.GA19220@wolff.to> <20171128061306.GA7842@wolff.to> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed In-Reply-To: <20171128061306.GA7842@wolff.to> Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Nov 28, 2017 at 00:13:06 -0600, Bruno Wolff III wrote: >I do some source address rewriting and it may be that the initial >addresses used for the encapsulating packets are different than the >ones later. When I'm on the local network, 192.168.6.1 gets used for the initial source adddress and gets rewritten to 98.103.208.26 in order to make the source consistent for the laptop whether or not it is on the local network. (That way I don't need to allow connections from 192.168.6.1 somewhere else where it wouldn't be my router.) When this happens the source port seems to normally get changed. Wireguard on the laptop remembers the new source port and tries to keep using it after the router is rebooted. But during the reboot the router forgets about the port mapping so it ends up dropping the packets. It has no reason to send packets on its own to the laptop (and wouldn't know where to send them) so the port doesn't get corrected. I think the correct fix is to know if I reboot the router for testing something, I need to also restart wireguard to make sure it is sending data to the expected port. This isn't going to be an issue in normal operation.