mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-11-30 21:50:54 +00:00
link/inet: fix rtnl_link_inet_get_conf() not to allocate inet_data
Instead of allocating a 'struct inet_data', rtnl_link_inet_get_conf() should only look for an existing entry. Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
371d1a0790
commit
01784b72da
@ -242,7 +242,7 @@ int rtnl_link_inet_get_conf(struct rtnl_link *link, const unsigned int cfgid,
|
||||
if (cfgid == 0 || cfgid > IPV4_DEVCONF_MAX)
|
||||
return -NLE_RANGE;
|
||||
|
||||
if (!(id = rtnl_link_af_alloc(link, &inet_ops)))
|
||||
if (!(id = rtnl_link_af_data(link, &inet_ops)))
|
||||
return -NLE_NOATTR;
|
||||
|
||||
if (!id->i_confset[cfgid - 1])
|
||||
|
Loading…
Reference in New Issue
Block a user