From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=iuB8ycaX; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 7EF4E5A061E for ; Tue, 12 Nov 2024 05:06:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1731384378; bh=zRDqW9/fw1k9EZqrYjnzik2C67nqb7++alQVVXRX0a0=; h=From:To:Cc:Subject:Date:From; b=iuB8ycaXI8p453g4E1KHke7QgHfW0Y/CR8vPD0Ei8WXTCtoWJs/bgyqhmxVDYPL/f p2UeecmgMEOSvtg6nZMQmWZEdEXbmPFUI8PE636e1SSZaYuUVOlY3SoeCT/G776cfc CxkeE+D0x4IFcu/t3G3d5/qU2HoF8YwWVdpu3xYP4AsjOCJcf++iaUm6yDnnsM7t+F VxMdGSnjUnZwUaE8fdGpHSirrldJ0UfC/xEGE+NJDLdSgFOX5LdW7iY+jZYtEJhtwT a6920CpbWYFMFVkNVPyK0navsb3iiL+dyiDMP9OdbYRsfXKjmW6iBAAx3qIxOelZx/ W4rwKdgMHepRA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XnXsQ21q2z4x8T; Tue, 12 Nov 2024 15:06:18 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 0/6] ndp: Unsolicited RAs Date: Tue, 12 Nov 2024 15:06:12 +1100 Message-ID: <20241112040618.1804081-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: WJBNA2DYLRXSEJOWIQVVEPIADN7XCEBL X-Message-ID-Hash: WJBNA2DYLRXSEJOWIQVVEPIADN7XCEBL X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The default route a guest obtains via NDP has an expiry. We set this to the maximum allowed, 65535s (about 18 hours). We missed, however, that after that expiry, the guest won't send a new Router Solicitation. Instead it expects an unsolicited Router Advertisement to have come at some point before the expiry. This means that on an IPv6 setup, the default will disappear after 18 hours. Correct this by sending unsolicited Router Advertisements as required by RFC 4861. Along the way we make a number of small cleanups to the NDP code. Link: https://github.com/kubevirt/kubevirt/issues/13191 David Gibson (6): ndp: Remove redundant update to addr_seen ndp: Add ndp_send() helper ndp: Split out helpers for sending specific NDP message types ndp: Use struct assignment in preference to memcpy() for IPv6 addresses ndp: Make route lifetime a #define ndp: Send unsolicited Router Advertisements ip.h | 9 +++ ndp.c | 210 ++++++++++++++++++++++++++++++++++++-------------------- ndp.h | 7 +- passt.c | 3 + 4 files changed, 152 insertions(+), 77 deletions(-) -- 2.47.0