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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 463366E517 for ; Mon, 23 Aug 2021 19:41:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 33E7C27208 for ; Mon, 23 Aug 2021 19:41:41 +0200 (CEST) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 B7987271F7 for ; Mon, 23 Aug 2021 19:41:36 +0200 (CEST) Received: by mail-wm1-x329.google.com with SMTP id o39-20020a05600c512700b002e74638b567so542939wms.2 for ; Mon, 23 Aug 2021 10:41:36 -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:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=rRqAV0yiwLMChw/0pg30Cgau97ya4YzmHhcXA7OjBuY=; b=AxAD1Ge45Rf2msz8AVIawnq1F21DcJpSzhN/fePMc16jXnsKFI2fejMYlSZj/3j31H PMyADo158b8LQQLd4b9U7APzlpZA/H64Fu/XI6+PX3YhxELwE5bSbae/2OjeIDyR9WA0 7Rs4GPVBWHKxdqCX2vo1GGotDusNn5uOdLJmGq4BQ39CkRBarOkC6nfy5utG07fku9Ll IJen/phc5rc3DTkVFgJSc3WoVbTHT/Dvox+6RxIChXd1RBIIene+IPVpF+0YmaCZLWgL 8lsiR6bBjhq7H18xANaB8aXTOq4joCFL4aPtpegy5Y6PqMDOfmy0nMptgIbEM1YWv54e ACIA== 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:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=rRqAV0yiwLMChw/0pg30Cgau97ya4YzmHhcXA7OjBuY=; b=GZMIUtAK7pZWJ7UlIf1EizNdNG4Hpb5J9zWXCDdcSqqAKwDBEAowXtj6cRx20yeP7A pQIVdoG8CD7T3evnd/1G4QyOJaQT1QbS6f6rF/2T4pTcpjyYUyMLdGlmvtBKhpk8Vcg+ Y8Rj80lyDfSEgrNxXpxkG2qHujUIIJmfE2YReEypIrITGYa4buwWLUMI4TAGveyRY+P3 IoOZWqaCm/MBgQ3y7Xx0+e668OOOOFT654jz50NBtlBOY/pEaV06LK9aWhD9cfVOr8fT BiFbEwoxxgTLiYvvF8awUOgNOnvm6J04/sq2rcGtXM+8meXTVHWqC4u36QEfopYu0LBQ Cgjg== X-Gm-Message-State: AOAM533SAKVlyUgNVNvjYkE8SWW2hl5y9vp4HLNUzdDAxxIic3QNmxc2 JD6R21Y0l3JUgeSesk5xw0qSyHK93uxGOA== X-Google-Smtp-Source: ABdhPJygyBaX/pXP16exzYhrnsHzDY+BOMXGuB0o3Zq5r9JX3Tmuqn05ud7omOx7Hv52FjlP0pwQmw== X-Received: by 2002:a05:600c:a05:: with SMTP id z5mr17870702wmp.73.1629740490174; Mon, 23 Aug 2021 10:41:30 -0700 (PDT) Received: from ?IPv6:2a0a:1580:0:1::100c? (ovpn1.odiso.net. [2a0a:1580:2000::3f]) by smtp.gmail.com with ESMTPSA id n15sm7889008wmq.7.2021.08.23.10.41.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 10:41:29 -0700 (PDT) Message-ID: <538af0d932e198fc4d97c35d3e44c1db3138e048.camel@odiso.com> From: alexandre derumier To: pve-devel@lists.proxmox.com Date: Mon, 23 Aug 2021 19:41:28 +0200 In-Reply-To: <20210721062228.1343888-1-aderumier@odiso.com> References: <20210721062228.1343888-1-aderumier@odiso.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.726 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 Subject: Re: [pve-devel] [PATCH pve-network] evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node 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: Mon, 23 Aug 2021 17:41:41 -0000 Don't apply this patch, it has been replaced by another one in my last patches serie. Le mercredi 21 juillet 2021 à 08:22 +0200, Alexandre Derumier a écrit : > This is breaking routing between the evpn vrf && default vrf leak  on > exit node only > > Signed-off-by: Alexandre Derumier > --- >  PVE/Network/SDN/Zones/EvpnPlugin.pm                   | 5 ++--- >  test/zones/evpn/exitnode/expected_sdn_interfaces      | 1 - >  test/zones/evpn/exitnode_snat/expected_sdn_interfaces | 1 - >  3 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm > b/PVE/Network/SDN/Zones/EvpnPlugin.pm > index 4fa46f7..6dd970b 100644 > --- a/PVE/Network/SDN/Zones/EvpnPlugin.pm > +++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm > @@ -73,6 +73,7 @@ sub generate_sdn_config { >      my $bgprouter = > PVE::Network::SDN::Controllers::EvpnPlugin::find_bgp_controller($loca > l_node, $controller_cfg); >      my $loopback = $bgprouter->{loopback} if $bgprouter->{loopback}; >      my ($ifaceip, $iface) = > PVE::Network::SDN::Zones::Plugin::find_local_ip_interface_peers(\@pee > rs, $loopback); > +    my $is_evpn_gateway = $plugin_config->{'exitnodes'}- > >{$local_node}; >   >      my $mtu = 1450; >      $mtu = $interfaces_config->{$iface}->{mtu} - 50 if > $interfaces_config->{$iface}->{mtu}; > @@ -127,8 +128,6 @@ sub generate_sdn_config { >   >         if ($subnet->{snat}) { >   > -           my $is_evpn_gateway = $plugin_config->{'exitnodes'}- > >{$local_node}; > - >              #find outgoing interface >              my ($outip, $outiface) = > PVE::Network::SDN::Zones::Plugin::get_local_route_ip($checkrouteip); >              if ($outip && $outiface && $is_evpn_gateway) { > @@ -158,7 +157,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 @iface_config, "post-up ip route add vrf $vrf_iface > unreachable default metric 4278198272" if !$is_evpn_gateway; >         push(@{$config->{$vrf_iface}}, @iface_config) if !$config- > >{$vrf_iface}; >   >         if ($vrfvxlan) { > diff --git a/test/zones/evpn/exitnode/expected_sdn_interfaces > b/test/zones/evpn/exitnode/expected_sdn_interfaces > index 4cf13e0..ca691cd 100644 > --- a/test/zones/evpn/exitnode/expected_sdn_interfaces > +++ b/test/zones/evpn/exitnode/expected_sdn_interfaces > @@ -14,7 +14,6 @@ iface myvnet >  auto vrf_myzone >  iface vrf_myzone >         vrf-table auto > -       post-up ip route add vrf vrf_myzone unreachable default > metric 4278198272 >   >  auto vrfbr_myzone >  iface vrfbr_myzone > diff --git a/test/zones/evpn/exitnode_snat/expected_sdn_interfaces > b/test/zones/evpn/exitnode_snat/expected_sdn_interfaces > index a2a183e..77168ad 100644 > --- a/test/zones/evpn/exitnode_snat/expected_sdn_interfaces > +++ b/test/zones/evpn/exitnode_snat/expected_sdn_interfaces > @@ -33,7 +33,6 @@ iface myvnet2 >  auto vrf_myzone >  iface vrf_myzone >         vrf-table auto > -       post-up ip route add vrf vrf_myzone unreachable default > metric 4278198272 >   >  auto vrfbr_myzone >  iface vrfbr_myzone