summaryrefslogtreecommitdiff
path: root/lib/route/tc.c
diff options
context:
space:
mode:
authorThomas Graf <tgr@lsx.localdomain>2008-05-14 18:26:47 +0200
committerThomas Graf <tgr@lsx.localdomain>2008-05-14 18:26:47 +0200
commiteed2afaab7aa72fae393a395a8879b91a922ff5e (patch)
treee28561df020521ed10854fdfa07c0e0c7e701c13 /lib/route/tc.c
parent7179b2d85964ef8fec8eca3ad661de9f38daa0ba (diff)
downloadlibnl-eed2afaab7aa72fae393a395a8879b91a922ff5e.tar.gz
Remove obsolete nla_get_addr() and nla_get_data()
Replaces obsolete calls to nla_get_addr() and nla_get_data() with nl_addr_alloc_attr() respectively nl_data_alloc_attr(). Also fixes missing error handling while parsing routing multipath configuration.
Diffstat (limited to 'lib/route/tc.c')
-rw-r--r--lib/route/tc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/route/tc.c b/lib/route/tc.c
index 1114eac..de909be 100644
--- a/lib/route/tc.c
+++ b/lib/route/tc.c
@@ -81,7 +81,7 @@ int tca_msg_parser(struct nlmsghdr *n, struct rtnl_tca *g)
TCA_ATTR_PARENT | TCA_ATTR_INFO | TCA_ATTR_KIND);
if (tb[TCA_OPTIONS]) {
- g->tc_opts = nla_get_data(tb[TCA_OPTIONS]);
+ g->tc_opts = nl_data_alloc_attr(tb[TCA_OPTIONS]);
if (!g->tc_opts)
return -NLE_NOMEM;
g->ce_mask |= TCA_ATTR_OPTS;
@@ -126,7 +126,7 @@ int tca_msg_parser(struct nlmsghdr *n, struct rtnl_tca *g)
g->ce_mask |= TCA_ATTR_STATS;
if (tbs[TCA_STATS_APP]) {
- g->tc_xstats = nla_get_data(tbs[TCA_STATS_APP]);
+ g->tc_xstats = nl_data_alloc_attr(tbs[TCA_STATS_APP]);
if (g->tc_xstats == NULL)
return -NLE_NOMEM;
} else
@@ -149,7 +149,7 @@ int tca_msg_parser(struct nlmsghdr *n, struct rtnl_tca *g)
compat_xstats:
if (tb[TCA_XSTATS]) {
- g->tc_xstats = nla_get_data(tb[TCA_XSTATS]);
+ g->tc_xstats = nl_data_alloc_attr(tb[TCA_XSTATS]);
if (g->tc_xstats == NULL)
return -NLE_NOMEM;
g->ce_mask |= TCA_ATTR_XSTATS;