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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue