From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id CFD7571754 for ; Thu, 8 Apr 2021 14:03:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C14B01B0FD for ; Thu, 8 Apr 2021 14:02:42 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 2919D1B0F4 for ; Thu, 8 Apr 2021 14:02:41 +0200 (CEST) Received: by mail-wr1-x436.google.com with SMTP id a4so1864112wrr.2 for ; Thu, 08 Apr 2021 05:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=odiso-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=u9OKDP+rfUmP4RAovEKpaSBv7bKqR3pzxvIQRMtRyTc=; b=brNqZYz5H2my1USVjJ9dXqEA1yrHM0UtzlMr+bNmCsYzE0rz4KT9MsYpMqncULUcW2 9JSQ8i/GUr1vwCgcIOtzPysaeU+wO7LFHyKkTBk5MPoevYIjf0O9cm+FPPzaRPvpkMq+ AgnnP4EuSMMt2SN+7m9oKSB2eE8UTd+wiBV+sliXQlaBetVNpKPbSI2BI/doZgGMwVku jjBcTHzu4wP5zeCRHDwe5exAoXG3m2vbPCFZp4cB7KIigb7UEqXZEVZgEcb58hFgBYM1 D2AHy+/RoOhQ3+cOI9apyHlAXcfr1EDOCIrqdfHgKmy0+mDCH5/uQYIxdQo67++pcKO2 Wc5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=u9OKDP+rfUmP4RAovEKpaSBv7bKqR3pzxvIQRMtRyTc=; b=Ml95rVBCZdv5SL9UTk7Yhjt+ol9hbzUJq30Vns0F0vIm8p147d/o1SNcxZwTLaxzS/ 1aJzelPz4Xi9Sxi0JrxlQlt7YgQGa0mIWbtiDVUVtFxRvhaIi77NYbsR2CGilfXV7eEG jlRfi4iSvg2NtY6UnubyzOfJot/ungtRzZxUcJzP2Vt6Neeixdf+vvTpngbDNeNfYF9y jX7TqiiUWbildBy5LmxRFAQbpK0x32oQQz5CKzWJTQnupkJrF6cRqUWKeNksaNb2KrPM DIiHzg7eetgvtLMjXck2pod96oA3Jtyz+w0M4GecOaOEMAl+1Zj0AqDObcNijWSlObTv NdwQ== X-Gm-Message-State: AOAM531fsR6LNt9OBxGl9u84+8dIWoXHuJ5zJGM7l3xqAt3ZY9ugr6q7 Sec+hB1OqzYbksWeQIS61mgN4HELHofd/lBi X-Google-Smtp-Source: ABdhPJw4Z+Hx1YzkxrJtAC1/HziVx5tGryZ4HtiOJ0VIZpD+46b3pwAbVB19rrinj4d+IuSJCUXJEQ== X-Received: by 2002:a05:6000:1acb:: with SMTP id i11mr10862247wry.68.1617883354717; Thu, 08 Apr 2021 05:02:34 -0700 (PDT) Received: from ?IPv6:2a0a:1580:0:1::100c? (ovpn1.odiso.net. [2a0a:1580:2000::3f]) by smtp.gmail.com with ESMTPSA id 91sm50444475wrl.20.2021.04.08.05.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 05:02:34 -0700 (PDT) Message-ID: <566b520c35f9c74610b50a84d3a31926bcd21c11.camel@odiso.com> From: aderumier@odiso.com To: Proxmox VE development discussion Cc: Alexandre Bruyelles Date: Thu, 08 Apr 2021 14:02:32 +0200 In-Reply-To: <20210408083227.17478-2-git@jack.fr.eu.org> References: <20210408083227.17478-1-git@jack.fr.eu.org> <20210408083227.17478-2-git@jack.fr.eu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.089 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [evpnplugin.pm] Subject: Re: [pve-devel] [PATCH container 1/1] zones: evpn: add a default unreachable, to prevent vrf leak X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 12:03:12 -0000 Good Catch. Thanks Jack ! Le jeudi 08 avril 2021 à 10:32 +0200, Alexandre Bruyelles a écrit : > On Linux, when no route is found in a vrf, it somehow fallback > to the default routing table. In our case, that means a leak > from the overlay to the underlay. > Adding a low priority unreachable catch-all route is the way to go, > as > per the doc: > https://www.kernel.org/doc/Documentation/networking/vrf.txt > > Signed-off-by: Alexandre Bruyelles > --- >  PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 + >  1 file changed, 1 insertion(+) > > diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm > b/PVE/Network/SDN/Zones/EvpnPlugin.pm > index e6ee839..ca000cf 100644 > --- a/PVE/Network/SDN/Zones/EvpnPlugin.pm > +++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm > @@ -134,6 +134,7 @@ sub generate_sdn_config { >         #vrf interface >         @iface_config = (); >         push @iface_config, "vrf-table auto"; > +       push @iface_config, "post-up ip route add vrf $vrf_iface > unreachable default metric 4278198272"; >         push(@{$config->{$vrf_iface}}, @iface_config) if !$config- > >{$vrf_iface}; >   >         if ($vrfvxlan) {