]> granicus.if.org Git - libnl/commitdiff
lib/route: Export correct ipgre functionality
authorJef Oliver <jef.oliver@intel.com>
Wed, 5 Oct 2016 20:20:35 +0000 (13:20 -0700)
committerThomas Haller <thaller@redhat.com>
Sat, 5 Nov 2016 17:07:53 +0000 (18:07 +0100)
* Rename rtnl_link_get_pmtudisc to rtnl_link_ipgre_get_pmtudisc
  in ipgre.c, making the function correctly match the exported
  functionality in ipgre.h. This fixes an error when trying to
  use the function, returning an incorrect type usage due to the
  link module already having a function of the same name.

* Export rtnl_link_is_[ipgre/ipgretap] allowing for usage per
  documentation.

Reported-by: Sharada Shiddibhavi <sharada.shiddibhavi@intel.com>
Signed-off-by: Jef Oliver <jef.oliver@intel.com>
include/netlink/route/link/ipgre.h
lib/route/link/ipgre.c
libnl-route-3.sym

index 647c3cfd5a9c2a4c3bf2db0643de29ca40aa2dff..4c5f86b0dd3e4b70eebe72598f6be72053c094e3 100644 (file)
@@ -19,6 +19,9 @@
 extern "C" {
 #endif
 
+       extern int rtnl_link_is_ipgre(struct rtnl_link *link);
+       extern int rtnl_link_is_ipgretap(struct rtnl_link *link);
+
        extern struct rtnl_link *rtnl_link_ipgre_alloc(void);
        extern struct rtnl_link *rtnl_link_ipgretap_alloc(void);
        extern int rtnl_link_ipgre_add(struct nl_sock *sk, const char *name);
index 7dca4d596182138c6e353d3569d215fab73b5cd6..184f37ab2dc1adee9aa346d9c6576874415dc16d 100644 (file)
@@ -809,7 +809,7 @@ int rtnl_link_ipgre_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc)
  *
  * @return pmtudisc value
  */
-uint8_t rtnl_link_get_pmtudisc(struct rtnl_link *link)
+uint8_t rtnl_link_ipgre_get_pmtudisc(struct rtnl_link *link)
 {
        struct ipgre_info *ipgre = link->l_info;
 
index ce6aa885292762b9e3f2dde78df4a3562b19d152..bfab14569d798c4a87cc51908bba5fdfbb34fcbf 100644 (file)
@@ -956,6 +956,8 @@ global:
        rtnl_link_bridge_set_hwmode;
        rtnl_link_bridge_hwmode2str;
        rtnl_link_bridge_str2hwmode;
+       rtnl_link_ipgre_get_pmtudisc;
+       rtnl_link_is_ipgretap;
        rtnl_link_macvlan_add_macaddr;
        rtnl_link_macvlan_count_macaddr;
        rtnl_link_macvlan_del_macaddr;