diff options
| author | Alexandre Derumier <aderumier@odiso.com> | 2020-06-30 14:25:29 +0200 |
|---|---|---|
| committer | Fabian Grünbichler <f.gruenbichler@proxmox.com> | 2020-07-01 09:36:40 +0200 |
| commit | 5a60da84d97d79a66b48d8b0153030358684b5cd (patch) | |
| tree | d99bade31ae37f1f07f16fb2be8b871156137de4 | |
| parent | 0f70063526c6abb076eb9e07eb5370fef99ba2b2 (diff) | |
use PVE::Tools::split_list for ip lists
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
| -rw-r--r-- | PVE/Network/SDN/Controllers/EvpnPlugin.pm | 4 | ||||
| -rw-r--r-- | PVE/Network/SDN/Zones/EvpnPlugin.pm | 2 | ||||
| -rw-r--r-- | PVE/Network/SDN/Zones/VxlanPlugin.pm | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/PVE/Network/SDN/Controllers/EvpnPlugin.pm index 79ecaeb..9321af1 100644 --- a/PVE/Network/SDN/Controllers/EvpnPlugin.pm +++ b/PVE/Network/SDN/Controllers/EvpnPlugin.pm @@ -47,11 +47,11 @@ sub options { sub generate_controller_config { my ($class, $plugin_config, $controller, $id, $uplinks, $config) = @_; - my @peers = split(',', $plugin_config->{'peers'}) if $plugin_config->{'peers'}; + my @peers = PVE::Tools::split_list($plugin_config->{'peers'}) if $plugin_config->{'peers'}; my $asn = $plugin_config->{asn}; my $gatewaynodes = $plugin_config->{'gateway-nodes'}; - my @gatewaypeers = split(',', $plugin_config->{'gateway-external-peers'}) if $plugin_config->{'gateway-external-peers'}; + my @gatewaypeers = PVE::Tools::split_list($plugin_config->{'gateway-external-peers'}) if $plugin_config->{'gateway-external-peers'}; return if !$asn; diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm index 95fbb64..b2f57ee 100644 --- a/PVE/Network/SDN/Zones/EvpnPlugin.pm +++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm @@ -52,7 +52,7 @@ sub generate_sdn_config { die "missing vxlan tag" if !$tag; warn "vlan-aware vnet can't be enabled with evpn plugin" if $vnet->{vlanaware}; - my @peers = split(',', $controller->{'peers'}); + my @peers = PVE::Tools::split_list($controller->{'peers'}); my ($ifaceip, $iface) = PVE::Network::SDN::Zones::Plugin::find_local_ip_interface_peers(\@peers); my $mtu = 1450; diff --git a/PVE/Network/SDN/Zones/VxlanPlugin.pm b/PVE/Network/SDN/Zones/VxlanPlugin.pm index bc585c6..5f17e15 100644 --- a/PVE/Network/SDN/Zones/VxlanPlugin.pm +++ b/PVE/Network/SDN/Zones/VxlanPlugin.pm @@ -50,7 +50,7 @@ sub generate_sdn_config { my $ipv6 = $vnet->{ipv6}; my $mac = $vnet->{mac}; my $multicastaddress = $plugin_config->{'multicast-address'}; - my @peers = split(',', $plugin_config->{'peers'}) if $plugin_config->{'peers'}; + my @peers = PVE::Tools::split_list($plugin_config->{'peers'}) if $plugin_config->{'peers'}; my $vxlan_iface = "vxlan_$vnetid"; die "missing vxlan tag" if !$tag; |
