summaryrefslogtreecommitdiff
path: root/src/platform/nm-linux-platform.c
diff options
context:
space:
mode:
authorOlegBravo <oleg.bravo.ru@gmail.com>2019-10-15 16:13:37 +0300
committerLubomir Rintel <lkundrak@v3.sk>2019-10-30 16:13:47 +0100
commit12661e2f21e9c8c68d6d174f5ff5b952e394c8a2 (patch)
treec3abfed2cb039540827e66ab322ece8a8dd58235 /src/platform/nm-linux-platform.c
parent5535dcf51ba759555a8e20504030dc59e526925e (diff)
downloadNetworkManager-contrail/vrouter.tar.gz
Vhost0 management integration.contrail/vrouter
Removing systemd networking configuration at RHEL8 jeopardized Contrail Virtual Router deployment (https://github.com/Juniper/contrail-vrouter ) - multiple CNI are based on this project. Problem is in configuring vhost0 - layer3 interface , used between host OS and Vrouter itself. It is being configured with systemd now , but for newest RHEL major release this functionality should be moved to NetworkManager. This will also benefit recent problems we had with OpenShift which also uses NM. Documentation was added into README.md , for new functinality testing - just follow it , creating of vhost0 interface is expted as successfull result.
Diffstat (limited to 'src/platform/nm-linux-platform.c')
-rw-r--r--src/platform/nm-linux-platform.c78
1 files changed, 41 insertions, 37 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 305ae52e3a..8a35e9e979 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -624,43 +624,44 @@ typedef struct {
} LinkDesc;
static const LinkDesc linktypes[] = {
- { NM_LINK_TYPE_NONE, "none", NULL, NULL },
- { NM_LINK_TYPE_UNKNOWN, "unknown", NULL, NULL },
-
- { NM_LINK_TYPE_ETHERNET, "ethernet", NULL, NULL },
- { NM_LINK_TYPE_INFINIBAND, "infiniband", NULL, NULL },
- { NM_LINK_TYPE_OLPC_MESH, "olpc-mesh", NULL, NULL },
- { NM_LINK_TYPE_WIFI, "wifi", NULL, "wlan" },
- { NM_LINK_TYPE_WWAN_NET, "wwan", NULL, "wwan" },
- { NM_LINK_TYPE_WIMAX, "wimax", "wimax", "wimax" },
- { NM_LINK_TYPE_WPAN, "wpan", NULL, NULL },
- { NM_LINK_TYPE_6LOWPAN, "6lowpan", NULL, NULL },
-
- { NM_LINK_TYPE_BNEP, "bluetooth", NULL, "bluetooth" },
- { NM_LINK_TYPE_DUMMY, "dummy", "dummy", NULL },
- { NM_LINK_TYPE_GRE, "gre", "gre", NULL },
- { NM_LINK_TYPE_GRETAP, "gretap", "gretap", NULL },
- { NM_LINK_TYPE_IFB, "ifb", "ifb", NULL },
- { NM_LINK_TYPE_IP6TNL, "ip6tnl", "ip6tnl", NULL },
- { NM_LINK_TYPE_IP6GRE, "ip6gre", "ip6gre", NULL },
- { NM_LINK_TYPE_IP6GRETAP, "ip6gretap", "ip6gretap", NULL },
- { NM_LINK_TYPE_IPIP, "ipip", "ipip", NULL },
- { NM_LINK_TYPE_LOOPBACK, "loopback", NULL, NULL },
- { NM_LINK_TYPE_MACSEC, "macsec", "macsec", NULL },
- { NM_LINK_TYPE_MACVLAN, "macvlan", "macvlan", NULL },
- { NM_LINK_TYPE_MACVTAP, "macvtap", "macvtap", NULL },
- { NM_LINK_TYPE_OPENVSWITCH, "openvswitch", "openvswitch", NULL },
- { NM_LINK_TYPE_PPP, "ppp", NULL, "ppp" },
- { NM_LINK_TYPE_SIT, "sit", "sit", NULL },
- { NM_LINK_TYPE_TUN, "tun", "tun", NULL },
- { NM_LINK_TYPE_VETH, "veth", "veth", NULL },
- { NM_LINK_TYPE_VLAN, "vlan", "vlan", "vlan" },
- { NM_LINK_TYPE_VXLAN, "vxlan", "vxlan", "vxlan" },
- { NM_LINK_TYPE_WIREGUARD, "wireguard", "wireguard", "wireguard" },
-
- { NM_LINK_TYPE_BRIDGE, "bridge", "bridge", "bridge" },
- { NM_LINK_TYPE_BOND, "bond", "bond", "bond" },
- { NM_LINK_TYPE_TEAM, "team", "team", NULL },
+ { NM_LINK_TYPE_NONE, "none", NULL, NULL },
+ { NM_LINK_TYPE_UNKNOWN, "unknown", NULL, NULL },
+
+ { NM_LINK_TYPE_ETHERNET, "ethernet", NULL, NULL },
+ { NM_LINK_TYPE_INFINIBAND, "infiniband", NULL, NULL },
+ { NM_LINK_TYPE_OLPC_MESH, "olpc-mesh", NULL, NULL },
+ { NM_LINK_TYPE_WIFI, "wifi", NULL, "wlan" },
+ { NM_LINK_TYPE_WWAN_NET, "wwan", NULL, "wwan" },
+ { NM_LINK_TYPE_WIMAX, "wimax", "wimax", "wimax" },
+ { NM_LINK_TYPE_WPAN, "wpan", NULL, NULL },
+ { NM_LINK_TYPE_6LOWPAN, "6lowpan", NULL, NULL },
+
+ { NM_LINK_TYPE_BNEP, "bluetooth", NULL, "bluetooth" },
+ { NM_LINK_TYPE_DUMMY, "dummy", "dummy", NULL },
+ { NM_LINK_TYPE_GRE, "gre", "gre", NULL },
+ { NM_LINK_TYPE_GRETAP, "gretap", "gretap", NULL },
+ { NM_LINK_TYPE_IFB, "ifb", "ifb", NULL },
+ { NM_LINK_TYPE_IP6TNL, "ip6tnl", "ip6tnl", NULL },
+ { NM_LINK_TYPE_IP6GRE, "ip6gre", "ip6gre", NULL },
+ { NM_LINK_TYPE_IP6GRETAP, "ip6gretap", "ip6gretap", NULL },
+ { NM_LINK_TYPE_IPIP, "ipip", "ipip", NULL },
+ { NM_LINK_TYPE_LOOPBACK, "loopback", NULL, NULL },
+ { NM_LINK_TYPE_MACSEC, "macsec", "macsec", NULL },
+ { NM_LINK_TYPE_MACVLAN, "macvlan", "macvlan", NULL },
+ { NM_LINK_TYPE_MACVTAP, "macvtap", "macvtap", NULL },
+ { NM_LINK_TYPE_OPENVSWITCH, "openvswitch", "openvswitch", NULL },
+ { NM_LINK_TYPE_PPP, "ppp", NULL, "ppp" },
+ { NM_LINK_TYPE_SIT, "sit", "sit", NULL },
+ { NM_LINK_TYPE_TUN, "tun", "tun", NULL },
+ { NM_LINK_TYPE_VETH, "veth", "veth", NULL },
+ { NM_LINK_TYPE_VLAN, "vlan", "vlan", "vlan" },
+ { NM_LINK_TYPE_VXLAN, "vxlan", "vxlan", "vxlan" },
+ { NM_LINK_TYPE_WIREGUARD, "wireguard", "wireguard", "wireguard" },
+ { NM_LINK_TYPE_CONTRAILVROUTER, "contrailvrouter", "contrailvrouter", NULL },
+
+ { NM_LINK_TYPE_BRIDGE, "bridge", "bridge", "bridge" },
+ { NM_LINK_TYPE_BOND, "bond", "bond", "bond" },
+ { NM_LINK_TYPE_TEAM, "team", "team", NULL },
};
static const char *
@@ -966,6 +967,9 @@ _linktype_get_type (NMPlatform *platform,
if (nm_streq (driver_info.driver, "openvswitch"))
return NM_LINK_TYPE_OPENVSWITCH;
+ if (nm_streq (driver_info.driver, "vrouter"))
+ return NM_LINK_TYPE_CONTRAILVROUTER;
+
if (arptype == 256) {
/* Some s390 CTC-type devices report 256 for the encapsulation type
* for some reason, but we need to call them Ethernet.