From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: apalrd <andrew@apalrd.net>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH pve-network 1/1] Update vxlan plugin to emit local tunnel IP
Date: Thu, 10 Oct 2024 08:21:14 +0200 [thread overview]
Message-ID: <1d64600d-c9c7-435a-a4dd-1a06ae49cdb8@proxmox.com> (raw)
In-Reply-To: <20241008040136.322811-2-andrew@apalrd.net>
An actual commit message would be good, including at least a reason for
why this is done.
Am 08/10/2024 um 06:01 schrieb apalrd:
> ---
> 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";
As Alexandre said, use an if/else, or alternatively a ternary:
my $vxlan_key = $address eq $ifaceip ? 'vxlan_local_tunnelip' : 'vxlan_remoteip';
push @iface_config, "$vxlan_key $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;
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-10-10 6:20 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
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 [this message]
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=1d64600d-c9c7-435a-a4dd-1a06ae49cdb8@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=andrew@apalrd.net \
--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