public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: apalrd via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: apalrd <andrew@apalrd.net>
Subject: [pve-devel] [PATCH pve-network 1/1] Update vxlan plugin to emit local tunnel IP
Date: Tue,  8 Oct 2024 00:01:36 -0400	[thread overview]
Message-ID: <mailman.222.1728378819.332.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20241008040136.322811-1-andrew@apalrd.net>

[-- Attachment #1: Type: message/rfc822, Size: 6112 bytes --]

From: apalrd <andrew@apalrd.net>
To: pve-devel@lists.proxmox.com
Cc: apalrd <andrew@apalrd.net>
Subject: [PATCH pve-network 1/1] Update vxlan plugin to emit local tunnel IP
Date: Tue,  8 Oct 2024 00:01:36 -0400
Message-ID: <20241008040136.322811-2-andrew@apalrd.net>

---
 src/PVE/Network/SDN/Zones/VxlanPlugin.pm                   | 4 ++--
 src/test/zones/vxlan/basic/expected_sdn_interfaces         | 1 +
 src/test/zones/vxlan/vlanawarevnet/expected_sdn_interfaces | 1 +
 src/test/zones/vxlan/vxlanport/expected_sdn_interfaces     | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
index 9a77bb9..c3cf0ce 100644
--- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
@@ -76,8 +76,8 @@ sub generate_sdn_config {
     push @iface_config, "vxlan-id $tag";
 
     for my $address (@peers) {
-	next if $address eq $ifaceip;
-	push @iface_config, "vxlan_remoteip $address";
+	    push @iface_config, "vxlan_local_tunnelip $address" if $address eq $ifaceip;
+        push @iface_config, "vxlan_remoteip $address" if $address ne $ifaceip;
     }
     push @iface_config, "vxlan-port $vxlanport" if $vxlanport;
 
diff --git a/src/test/zones/vxlan/basic/expected_sdn_interfaces b/src/test/zones/vxlan/basic/expected_sdn_interfaces
index 7b73c3e..dd12d93 100644
--- a/src/test/zones/vxlan/basic/expected_sdn_interfaces
+++ b/src/test/zones/vxlan/basic/expected_sdn_interfaces
@@ -10,6 +10,7 @@ iface myvnet
 auto vxlan_myvnet
 iface vxlan_myvnet
 	vxlan-id 100
+	vxlan_local_tunnelip 192.168.0.1
 	vxlan_remoteip 192.168.0.2
 	vxlan_remoteip 192.168.0.3
 	mtu 1450
diff --git a/src/test/zones/vxlan/vlanawarevnet/expected_sdn_interfaces b/src/test/zones/vxlan/vlanawarevnet/expected_sdn_interfaces
index 55cdf9c..e68ac4c 100644
--- a/src/test/zones/vxlan/vlanawarevnet/expected_sdn_interfaces
+++ b/src/test/zones/vxlan/vlanawarevnet/expected_sdn_interfaces
@@ -12,6 +12,7 @@ iface myvnet
 auto vxlan_myvnet
 iface vxlan_myvnet
 	vxlan-id 100
+	vxlan_local_tunnelip 192.168.0.1
 	vxlan_remoteip 192.168.0.2
 	vxlan_remoteip 192.168.0.3
 	mtu 1450
diff --git a/src/test/zones/vxlan/vxlanport/expected_sdn_interfaces b/src/test/zones/vxlan/vxlanport/expected_sdn_interfaces
index 572550a..0a8804f 100644
--- a/src/test/zones/vxlan/vxlanport/expected_sdn_interfaces
+++ b/src/test/zones/vxlan/vxlanport/expected_sdn_interfaces
@@ -10,6 +10,7 @@ iface myvnet
 auto vxlan_myvnet
 iface vxlan_myvnet
 	vxlan-id 100
+	vxlan_local_tunnelip 192.168.0.1
 	vxlan_remoteip 192.168.0.2
 	vxlan_remoteip 192.168.0.3
 	vxlan-port 6000
-- 
2.39.5



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

       reply	other threads:[~2024-10-08  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241008040136.322811-1-andrew@apalrd.net>
2024-10-08  4:01 ` apalrd via pve-devel [this message]
2024-10-09 14:49   ` DERUMIER, Alexandre via pve-devel
     [not found] ` <20241008040136.322811-2-andrew@apalrd.net>
2024-10-10  6:21   ` Thomas Lamprecht

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=mailman.222.1728378819.332.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=andrew@apalrd.net \
    /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