diff options
Diffstat (limited to 'src/platform/nm-platform.h')
-rw-r--r-- | src/platform/nm-platform.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 9db6874adb..3cde600084 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -1044,10 +1044,6 @@ typedef struct { const char *name, const NMPlatformLnkVxlan *props, const NMPlatformLink **out_link); - gboolean (*link_gre_add) (NMPlatform *self, - const char *name, - const NMPlatformLnkGre *props, - const NMPlatformLink **out_link); gboolean (*link_ip6tnl_add) (NMPlatform *self, const char *name, const NMPlatformLnkIp6Tnl *props, @@ -1425,6 +1421,17 @@ nm_platform_link_wireguard_add (NMPlatform *self, return nm_platform_link_add (self, NM_LINK_TYPE_WIREGUARD, name, 0, NULL, 0, NULL, out_link); } +static inline int +nm_platform_link_gre_add (NMPlatform *self, + const char *name, + const NMPlatformLnkGre *props, + const NMPlatformLink **out_link) +{ + g_return_val_if_fail (props, -NME_BUG); + + return nm_platform_link_add (self, props->is_tap ? NM_LINK_TYPE_GRETAP : NM_LINK_TYPE_GRE, name, 0, NULL, 0, props, out_link); +} + gboolean nm_platform_link_delete (NMPlatform *self, int ifindex); gboolean nm_platform_link_set_netns (NMPlatform *self, int ifindex, int netns_fd); @@ -1606,10 +1613,6 @@ const struct in6_addr *nm_platform_ip6_address_get_peer (const NMPlatformIP6Addr const NMPlatformIP4Address *nm_platform_ip4_address_get (NMPlatform *self, int ifindex, in_addr_t address, guint8 plen, in_addr_t peer_address); -int nm_platform_link_gre_add (NMPlatform *self, - const char *name, - const NMPlatformLnkGre *props, - const NMPlatformLink **out_link); int nm_platform_link_ip6tnl_add (NMPlatform *self, const char *name, const NMPlatformLnkIp6Tnl *props, |