From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 68C7F1FF161 for ; Tue, 8 Oct 2024 11:13:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D402B11F6D; Tue, 8 Oct 2024 11:13:40 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Tue, 8 Oct 2024 00:01:36 -0400 In-Reply-To: <20241008040136.322811-1-andrew@apalrd.net> References: <20241008040136.322811-1-andrew@apalrd.net> X-Mailman-Approved-At: Tue, 08 Oct 2024 11:13:39 +0200 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: apalrd via pve-devel Precedence: list Cc: apalrd X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH pve-network 1/1] Update vxlan plugin to emit local tunnel IP Content-Type: multipart/mixed; boundary="===============8762369503031069786==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============8762369503031069786== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com 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 1A37BC3344 for ; Tue, 8 Oct 2024 06:08:45 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D0EC6E8C1 for ; Tue, 8 Oct 2024 06:08:14 +0200 (CEST) Received: from mail-41103.protonmail.ch (mail-41103.protonmail.ch [185.70.41.103]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 8 Oct 2024 06:08:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apalrd.net; s=protonmail; t=1728360106; x=1728619306; bh=1UBmWeZlxDt+z+dMzDdivtvsCMoGGqQsw27FwVvlhoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=VlPXbxBrnHTtghq+z+rbiA+Dy73KX7rqwmxE/7dtZ5TPe4hg8yR62Mo8Y7XBc9lmR OPPaIk4Ad2XmDGHKI3EaHJF98BWsbUGUUJo6mTQNDK+/NAE/SlbnnQFNC24E29ottR QEqKeXgNG5Re0MMsZaBH/gaLKvJkCuTqVZviNY2ndX/8MxCdvPsBvW530JdwBl6NGR ADnWctmlkRW+XOwdBr8hDxSf5rS1L1kLgZgkCwdRli4ATPaAkH7WsFShoC85nNs1pX 2t7of7Jf0YN5hDjR9fwBE4SEsmxVLS8Mdps+qh7MTag5H1/Xx6Wg5MKMSSPpyNAdfg HJancp8/4DXJw== X-Pm-Submission-Id: 4XN2QJ54g5z4wwm9 From: apalrd To: pve-devel@lists.proxmox.com Cc: apalrd 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> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241008040136.322811-1-andrew@apalrd.net> References: <20241008040136.322811-1-andrew@apalrd.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 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 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_PASS -0.001 SPF: HELO matches 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. [apalrd.net,vxlanplugin.pm] X-Mailman-Approved-At: Tue, 08 Oct 2024 11:13:39 +0200 --- 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 --===============8762369503031069786== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============8762369503031069786==--