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:
Thomas Haller 2014-07-26 00:26:49 +02:00
parent 371d1a0790
commit 01784b72da

View File

@ -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])