From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 7C3B45A004E for ; Wed, 19 Jun 2024 10:31:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718785897; 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=7B6CSYlnAfgRarm06GhFmqQ/MSk6ZVwNEhl/jGlA/lE=; b=C3KctXgLssja0EwFH/Vi01c4/6vfVSlM8GVTYuY7mfNVX0uUoLUBZoUEUZEI4kKLlLb1zW FOJJIzf/QLrthnyxUYQWZe/d9M43EOP0JG2nlvXWCZ6aMMc36nneILNmUj5BemFsHCj3kj dr2EhhvnNwURMxjPI5z/EVW199QnwZw= 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-288-QD3sh9sROuK-zjr0k8zNKg-1; Wed, 19 Jun 2024 04:31:35 -0400 X-MC-Unique: QD3sh9sROuK-zjr0k8zNKg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4217b3d2044so49373115e9.0 for ; Wed, 19 Jun 2024 01:31:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718785894; x=1719390694; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7B6CSYlnAfgRarm06GhFmqQ/MSk6ZVwNEhl/jGlA/lE=; b=abj1CjDC/ZjYJIpE6OO6Agxexo1GgFz0pNuhAVIYFeCxrRusJcRB8lU7XqOiFDKZRJ mvA5leePlTorYmScToHrBZPYPVNi04xrIud6aWTBWs/UNoiZJS7InBbVGoVQfV+5WdCN kMWf6gLdS1Dd03fus8pjVXoc20WjorivuSLokpZpF71UoQS1qOIk1Q4w14XimCkYpYXB wl9iEnQSZsnlA9u3ofHwUWNGL/keoNPgdZgortsex1gDyydOhBKHEdKmAHYERtP62gpq PLerXIyZri9H1VEE8kCFnkBUXcew+eSvPGPZq6btu2iWsDp4/JV5vNT4VawABHjIJBDB o2Jg== X-Forwarded-Encrypted: i=1; AJvYcCVy7RFhRub2hh9RH/yLKKnXkzyVgEKssG8lt4N41s5kfXsgAqA9YAaOIS0FTYtehZbzme491yoCOHp9apXwyywOLjXd X-Gm-Message-State: AOJu0Ywm7LfUUjVm1579mhdJBpiP0zDfUKXXQApJ8ck9ajYUChnJa6/h +BZ1dCQ7vj7UkpGhd/fptE+IB733KhMpHeQb96aHyXYH4O0VB7pP+h+x48956/DaUHz7xBYBzJD kR0yPjOYjkum8rs8Vxci43ZB2BX5AaJ7MJESaERNbLmO01T/tuw== X-Received: by 2002:a05:600c:6a09:b0:421:eecc:2404 with SMTP id 5b1f17b1804b1-424751809e3mr12808585e9.24.1718785894434; Wed, 19 Jun 2024 01:31:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHycHTONKnCbSYHTpMPtyTRBduYQ9bI05oqykEWIKBtTt8y5qH4+0dfsppzp8jjLYgJoVB0gA== X-Received: by 2002:a05:600c:6a09:b0:421:eecc:2404 with SMTP id 5b1f17b1804b1-424751809e3mr12808405e9.24.1718785894044; Wed, 19 Jun 2024 01:31:34 -0700 (PDT) Received: from [192.168.188.25] ([80.243.52.135]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f612800csm218371235e9.28.2024.06.19.01.31.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jun 2024 01:31:33 -0700 (PDT) Message-ID: <4af8904c-610d-4d3a-a7a0-5a2b359249e2@redhat.com> Date: Wed, 19 Jun 2024 10:31:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] netlink: With no default route, pick the first interface with a route To: Stefano Brivio , passt-dev@passt.top References: <20240618171803.1924322-1-sbrivio@redhat.com> From: Paul Holzinger In-Reply-To: <20240618171803.1924322-1-sbrivio@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: BY6J5GT3Y5TVETZHWW4J2DJQ65ZDQBV5 X-Message-ID-Hash: BY6J5GT3Y5TVETZHWW4J2DJQ65ZDQBV5 X-MailFrom: pholzing@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: David Gibson , Jelle van der Waa , Martin Pitt 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 18/06/2024 19:18, Stefano Brivio wrote: > While commit f919dc7a4b1c ("conf, netlink: Don't require a default > route to start") sounded reasonable in the assumption that, if we > don't find default routes for a given address family, we can still > proceed by selecting an interface with any route *iff it's the only > one for that protocol family*, Jelle reported a further issue in a > similar setup. > > There, multiple interfaces are present, and while remote container > connectivity doesn't matter for the container, local connectivity is > desired. There are no default routes, but those multiple interfaces > all have non-default routes, so we should just pick one and start. > > Pick the first interface reported by the kernel with any route, if > there are no default routes. There should be no harm in doing so. > > Reported-by: Jelle van der Waa > Reported-by: Martin Pitt > Link:https://bugzilla.redhat.com/show_bug.cgi?id=2277954 > Signed-off-by: Stefano Brivio Reviewed-by: Paul Holzinger -- Paul Holzinger