summaryrefslogtreecommitdiffstats
path: root/lib/route/link/inet.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-07-25 22:26:49 (GMT)
committerThomas Haller <thaller@redhat.com>2014-07-27 09:01:14 (GMT)
commit01784b72da0b33548f767db437d38fdce86087bf (patch)
treefe38c3bcf30e8860f0709d5511e35d17ce895ede /lib/route/link/inet.c
parent371d1a07906ff63b6c392807fbb28e6cf0337968 (diff)
downloadlibnl-01784b72da0b33548f767db437d38fdce86087bf.zip
libnl-01784b72da0b33548f767db437d38fdce86087bf.tar.gz
libnl-01784b72da0b33548f767db437d38fdce86087bf.tar.bz2
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>
Diffstat (limited to 'lib/route/link/inet.c')
-rw-r--r--lib/route/link/inet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/link/inet.c b/lib/route/link/inet.c
index f166755..3bd76cc 100644
--- a/lib/route/link/inet.c
+++ b/lib/route/link/inet.c
@@ -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])