public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network] sdn: evpn: fix IPv6 exitnode local routing
Date: Fri, 16 Jan 2026 17:33:38 +0100	[thread overview]
Message-ID: <20260116163338.142289-1-h.laimer@proxmox.com> (raw)

IPv6 subnets on exitnodes had no working local-routing path. Add a v6
address on the xvrf veth pair and install IPv6 routes via that next-hop.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 7 ++++++-
 src/PVE/Network/SDN/Zones/EvpnPlugin.pm       | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index e53000a..74fc35d 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -462,7 +462,12 @@ sub generate_vnet_frr_config {
     foreach my $subnetid (sort keys %{$subnets}) {
         my $subnet = $subnets->{$subnetid};
         my $cidr = $subnet->{cidr};
-        push @controller_config, "ip route $cidr 10.255.255.2 xvrf_$zoneid";
+        my ($ip) = split(/\//, $cidr, 2);
+        if (Net::IP::ip_is_ipv6($ip)) {
+            push @controller_config, "ipv6 route $cidr fd00:ffff::2 xvrf_$zoneid";
+        } else {
+            push @controller_config, "ip route $cidr 10.255.255.2 xvrf_$zoneid";
+        }
     }
     push(@{ $config->{frr_ip_protocol} }, @controller_config);
 }
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 6d89499..4a61a4d 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -327,6 +327,7 @@ sub generate_sdn_config {
             @iface_config = ();
             push @iface_config, "link-type veth";
             push @iface_config, "address 10.255.255.1/30";
+            push @iface_config, "address6 fd00:ffff::1/126" if $ipv6;
             push @iface_config, "veth-peer-name $iface_xvrfp";
             push @iface_config, "mtu " . ($mtu + 50) if $mtu;
             push(@{ $config->{$iface_xvrf} }, @iface_config) if !$config->{$iface_xvrf};
@@ -334,6 +335,7 @@ sub generate_sdn_config {
             @iface_config = ();
             push @iface_config, "link-type veth";
             push @iface_config, "address 10.255.255.2/30";
+            push @iface_config, "address6 fd00:ffff::2/126" if $ipv6;
             push @iface_config, "veth-peer-name $iface_xvrf";
             push @iface_config, "vrf $vrf_iface";
             push @iface_config, "mtu " . ($mtu + 50) if $mtu;
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


                 reply	other threads:[~2026-01-16 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260116163338.142289-1-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal