[pve-devel] [PATCH pve-common] INotify: add support for dummy interfaces type
Alexandre Derumier
aderumier at odiso.com
Sun Nov 22 17:37:25 CET 2020
They can be used like loopback, but not limited to only 1 interface.
It's needed for bgp with multipath/ecmp to have a unique src ip
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/PVE/INotify.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index bd2b15a..676dcc6 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -960,6 +960,7 @@ sub __read_etc_network_interfaces {
'bond_miimon' => 1,
'bond_xmit_hash_policy' => 1,
'bond-primary' => 1,
+ 'link-type' => 1,
'uplink-id' => 1,
'vlan-protocol' => 1,
'vlan-raw-device' => 1,
@@ -1106,6 +1107,8 @@ sub __read_etc_network_interfaces {
my $tag = &$extract_ovs_option($d, 'tag');
$d->{ovs_tag} = $tag if defined($tag);
}
+ } elsif (defined($d->{'link-type'})) {
+ $d->{type} = $d->{'link-type'} if $d->{'link-type'} eq 'dummy';
}
}
@@ -1658,6 +1661,7 @@ NETWORKDOC
my $if_type_hash = {
loopback => 100000,
+ dummy => 100000,
eth => 200000,
OVSPort => 200000,
OVSIntPort => 300000,
--
2.20.1
More information about the pve-devel
mailing list