From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id AF7295A0269 for ; Thu, 03 Dec 2026 01:23:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796257437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WbcP38gSAZ0CDmU/x/smk3sJtzD+GzyEsCBgyq9hHDg=; b=Z0KKW7RXBxoIOsQaBPflmLt1hdLXXV7TNHdVMmxxoo9lmyHdnNRmwTJQbPVa+R4Q75bs21 pD9VU/m5e3Fk5DWpWRcLgATmDSRF1k+9vhHnx+HATO5yUCs7CC7fMYHV3jWIfuD5MK3mkh MljZpAvjPDUWQU1h3UEMStYWkZeRU1U= X-MC-Rep: binary re single Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-573-3cjJyXaCOxS5q9ZoVuPPZA-1; Thu, 3 Dec 2026 00:23:55 +0000 X-MC-Unique: 3cjJyXaCOxS5q9ZoVuPPZA-1 X-Mimecast-MFC-AGG-ID: 3cjJyXaCOxS5q9ZoVuPPZA_1796257434 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4bb8ae35aeaso112818015e9.3 for ; Wed, 02 Dec 2026 16:23:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796257434; x=1796862234; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to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TaJvk7VF JqfyccCUlY X-Received: by 2002:a05:600c:a087:b0:4a2:5267:3cd4 with SMTP id 5b1f17b1804b1-4bb887c9fbamr865464945e9.3.1796257434371; Wed, 02 Dec 2026 16:23:54 -0800 (PST) X-Received: by 2002:a05:600c:a087:b0:4a2:5267:3cd4 with SMTP id 5b1f17b1804b1-4bb887c9fbamr865464695e9.3.1796257433926; Wed, 02 Dec 2026 16:23:53 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe005543esm29020855e9.5.2026.12.02.16.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 16:23:53 -0800 (PST) From: Stefano Brivio To: Benjamin Schubert Subject: Re: [PATCH] netlink: Fix gateway selection for multipath default routes Message-ID: <20261203012351.191a47d9@elisabeth> In-Reply-To: References: Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Thu, 03 Dec 2026 01:23:52 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 4hkSjESOK_T3Qbf3WeD9uzv6GIlTiFlV756YGQl6zTM_1796257434 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: GNOA3CQOWZU6CF7A32HIQPCGKPWATYKZ X-Message-ID-Hash: GNOA3CQOWZU6CF7A32HIQPCGKPWATYKZ X-MailFrom: sbrivio@redhat.com 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: passt-dev@passt.top 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: On Tue, 01 Dec 2026 14:07:58 +0000 Benjamin Schubert wrote: > From: Benjamin Schubert > > The documentation of `--gateway` in `passt.1` states that > for a multipath default route, the first nexthop router returned > by the kernel with the highest weight is selected. > > `nl_route_get_def_multipath()` however allowed a subsequent route with > the same weight to override the nexthop, so it was the last gateway > with a nexthop that would actually be chosen. > > This aligns the code with the documentation, by fixing the code to > only select a new gateway if it has strictly a higher weight. > > Also update the selected weight only after finding a gateway. > Since a device-only enxthop is not a gateway cnadidate, it must > not prevent a subsequent gateway from being selected. > > Add 7 tests for various ipv4 and ipv6 scenarios with multipath > gateways. Note that ipv6 with no default gateway is not accepted by > the kernel, and thus ipv6 has one less test. > All 7 tests fail before this change. > > Link: https://bugs.passt.top/show_bug.cgi?id=230 > Signed-off-by: Benjamin Schubert Applied, thanks, and welcome to the git log! Contrary to what I assumed in my latest comment on the ticket, there was no substantial edit of the commit message needed, except for a couple of minor typos (enxthop, cnadidate), which I fixed on merge. -- Stefano