From: Alexandre Derumier Date: Sun, 22 Nov 2020 16:37:25 +0000 (+0100) Subject: INotify: add support for dummy interfaces type X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=a85812aff5c3c1c163b15854e518b3f46cd59d8f;p=pve-common.git INotify: add support for dummy interfaces type 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 --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 2bb87bb..3d8070d 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'; } } @@ -1660,6 +1663,7 @@ NETWORKDOC my $if_type_hash = { loopback => 100000, + dummy => 100000, eth => 200000, OVSPort => 200000, OVSIntPort => 300000,