diff options
author | Thomas Haller <thaller@redhat.com> | 2023-07-24 15:00:02 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-07-24 15:00:42 (GMT) |
commit | ec8c493c4ee9d0955390fbefbfb6e843a4fe24b8 (patch) | |
tree | a9eeee3bf368ef073dfd9559885d5fba57f64bb8 | |
parent | e790f8ad15d1051d3f0a6d59e5458bcaab2556f3 (diff) | |
download | libnl-ec8c493c4ee9d0955390fbefbfb6e843a4fe24b8.zip libnl-ec8c493c4ee9d0955390fbefbfb6e843a4fe24b8.tar.gz libnl-ec8c493c4ee9d0955390fbefbfb6e843a4fe24b8.tar.bz2 |
route/link: remove rtnl_link_inet6_set_conf() API
It's not clear how this API is useful. I don't think that kernel accepts
netlink requests to change the settings. So constructing a libnl3 object
in the user application seems not useful.
Also, because of the difficulty that DEVCONF_MAX is depending on the
current kernel, and changing. We need to improve how to handle the
option, and a rtnl_link_inet6_set_conf() only makes that more confusing.
The same is the case for rtnl_link_inet6_set_flags(), but that API
already exists, while rtnl_link_inet6_set_conf() is still new and
unreleased.
-rw-r--r-- | include/netlink/route/link/inet6.h | 4 | ||||
-rw-r--r-- | lib/route/link/inet6.c | 28 | ||||
-rw-r--r-- | libnl-route-3.sym | 1 |
3 files changed, 0 insertions, 33 deletions
diff --git a/include/netlink/route/link/inet6.h b/include/netlink/route/link/inet6.h index 708f6fe..b9229e2 100644 --- a/include/netlink/route/link/inet6.h +++ b/include/netlink/route/link/inet6.h @@ -40,10 +40,6 @@ extern int rtnl_link_inet6_get_conf(struct rtnl_link *, unsigned int, uint32_t *); -extern int rtnl_link_inet6_set_conf(struct rtnl_link *, - unsigned int, - uint32_t); - /* Link Flags Translations */ extern char * rtnl_link_inet6_flags2str(int, char *, size_t); extern int rtnl_link_inet6_str2flags(const char *); diff --git a/lib/route/link/inet6.c b/lib/route/link/inet6.c index 3575bc0..efb126c 100644 --- a/lib/route/link/inet6.c +++ b/lib/route/link/inet6.c @@ -718,34 +718,6 @@ int rtnl_link_inet6_get_conf(struct rtnl_link *link, unsigned int cfgid, return 0; } -/** - * Change value of a ipv6 link configuration setting - * @arg link Link object - * @arg cfgid Configuration identifier - * @arg value New value - * - * Changes the value in the per link ipv6 configuration array. - * - * @return 0 on success or a negative error code. - * @return -NLE_RANGE cfgid is out of range, 0..DEVCONF_MAX - * @return -NLE_NOMEM memory allocation failed - */ -int rtnl_link_inet6_set_conf(struct rtnl_link *link, unsigned int cfgid, - uint32_t value) -{ - struct inet6_data *id; - - if (!(id = rtnl_link_af_alloc(link, &inet6_ops))) - return -NLE_NOMEM; - - if (cfgid >= DEVCONF_MAX) - return -NLE_RANGE; - - id->i6_conf[cfgid] = value; - - return 0; -} - static void __init inet6_init(void) { diff --git a/libnl-route-3.sym b/libnl-route-3.sym index 99deb3a..01c8e1c 100644 --- a/libnl-route-3.sym +++ b/libnl-route-3.sym @@ -1284,5 +1284,4 @@ global: rtnl_link_bridge_set_vlan_protocol; rtnl_link_bridge_set_vlan_stats_enabled; rtnl_link_inet6_get_conf; - rtnl_link_inet6_set_conf; } libnl_3_7; |