From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-common] INotify: add support for dummy interfaces type
Date: Sun, 22 Nov 2020 17:37:25 +0100 [thread overview]
Message-ID: <20201122163725.1098912-1-aderumier@odiso.com> (raw)
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@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
next reply other threads:[~2020-11-22 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 16:37 Alexandre Derumier [this message]
2021-04-26 17:31 ` [pve-devel] applied: " Thomas Lamprecht
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=20201122163725.1098912-1-aderumier@odiso.com \
--to=aderumier@odiso.com \
--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