diff options
author | Thomas Haller <thaller@redhat.com> | 2019-12-31 13:27:02 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-01-09 10:42:31 +0100 |
commit | bfd74974dcedfb89d57146391781cded435aa9fa (patch) | |
tree | 4d23d878421c5a611b839a2664b2d99feecef50c /src/platform/nm-platform.c | |
parent | 8b417300ca7e0069c62c3b69adcccab2af9d6226 (diff) | |
download | NetworkManager-bfd74974dcedfb89d57146391781cded435aa9fa.tar.gz |
platform: implement link_ip6tnl_add via nm_platform_link_add()
Diffstat (limited to 'src/platform/nm-platform.c')
-rw-r--r-- | src/platform/nm-platform.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 04d9b2efb5..859b4f0297 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -1234,6 +1234,10 @@ nm_platform_link_add (NMPlatform *self, nm_utils_strbuf_append_str (&buf_p, &buf_len, ", "); nm_platform_lnk_sit_to_string ((const NMPlatformLnkSit *) extra_data, buf_p, buf_len); break; + case NM_LINK_TYPE_IP6TNL: + nm_utils_strbuf_append_str (&buf_p, &buf_len, ", "); + nm_platform_lnk_ip6tnl_to_string ((const NMPlatformLnkIp6Tnl *) extra_data, buf_p, buf_len); + break; default: nm_assert (!extra_data); break; @@ -2740,40 +2744,6 @@ nm_platform_link_infiniband_get_properties (NMPlatform *self, } /** - * nm_platform_ip6tnl_add: - * @self: platform instance - * @name: name of the new interface - * @props: interface properties - * @out_link: on success, the link object - * - * Create an IPv6 tunnel. - */ -int -nm_platform_link_ip6tnl_add (NMPlatform *self, - const char *name, - const NMPlatformLnkIp6Tnl *props, - const NMPlatformLink **out_link) -{ - int r; - - _CHECK_SELF (self, klass, -NME_BUG); - - g_return_val_if_fail (props, -NME_BUG); - g_return_val_if_fail (name, -NME_BUG); - g_return_val_if_fail (!props->is_gre, -NME_BUG); - - r = _link_add_check_existing (self, name, NM_LINK_TYPE_IP6TNL, out_link); - if (r < 0) - return r; - - _LOG2D ("adding link %s", nm_platform_lnk_ip6tnl_to_string (props, NULL, 0)); - - if (!klass->link_ip6tnl_add (self, name, props, out_link)) - return -NME_UNSPEC; - return 0; -} - -/** * nm_platform_ip6gre_add: * @self: platform instance * @name: name of the new interface |