diff options
author | Thomas Haller <thaller@redhat.com> | 2019-12-31 13:08:45 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-01-09 10:42:31 +0100 |
commit | d3963e4ac70a78970f1e1b626a84235b394db21b (patch) | |
tree | 6d66774849a9bc263182ded253a0f6499713102c /src/platform/nm-platform.c | |
parent | 62b9d8ee33cba9045daee0ae2d886e64f86eb38f (diff) | |
download | NetworkManager-d3963e4ac70a78970f1e1b626a84235b394db21b.tar.gz |
platform: implement link_vxlan_add via nm_platform_link_add()
Diffstat (limited to 'src/platform/nm-platform.c')
-rw-r--r-- | src/platform/nm-platform.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 5eca968346..3b62bd734f 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -1218,6 +1218,10 @@ nm_platform_link_add (NMPlatform *self, nm_utils_strbuf_append_str (&buf_p, &buf_len, ", "); nm_platform_lnk_vlan_to_string ((const NMPlatformLnkVlan *) extra_data, buf_p, buf_len); break; + case NM_LINK_TYPE_VXLAN: + nm_utils_strbuf_append_str (&buf_p, &buf_len, ", "); + nm_platform_lnk_vxlan_to_string ((const NMPlatformLnkVxlan *) extra_data, buf_p, buf_len); + break; case NM_LINK_TYPE_VETH: nm_sprintf_buf (buf, ", veth-peer \"%s\"", (const char *) extra_data); break; @@ -2320,38 +2324,6 @@ nm_platform_link_wireguard_change (NMPlatform *self, /*****************************************************************************/ /** - * nm_platform_link_vxlan_add: - * @self: platform instance - * @name: New interface name - * @props: properties of the new link - * @out_link: on success, the link object - * - * Create a VXLAN device. - */ -int -nm_platform_link_vxlan_add (NMPlatform *self, - const char *name, - const NMPlatformLnkVxlan *props, - const NMPlatformLink **out_link) -{ - int r; - - _CHECK_SELF (self, klass, -NME_BUG); - - g_return_val_if_fail (props, -NME_BUG); - - r = _link_add_check_existing (self, name, NM_LINK_TYPE_VXLAN, out_link); - if (r < 0) - return r; - - _LOG2D ("link: adding link %s", nm_platform_lnk_vxlan_to_string (props, NULL, 0)); - - if (!klass->link_vxlan_add (self, name, props, out_link)) - return -NME_UNSPEC; - return 0; -} - -/** * nm_platform_link_tun_add: * @self: platform instance * @name: new interface name |