summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2010-11-16 13:54:15 +0100
committerThomas Graf <tgraf@suug.ch>2010-11-16 13:54:15 +0100
commit2575d03135fa44ae08c54e9632bb7bb4fceab190 (patch)
tree5ad13fabb15c789e5e8693bcd50b929755f62e39
parente2099719a544ec5772d1d21573bc90ec4d2b1290 (diff)
downloadlibnl-2575d03135fa44ae08c54e9632bb7bb4fceab190.tar.gz
link: Add missing IFLA_AF_SPEC container attribute
-rw-r--r--lib/route/link.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/route/link.c b/lib/route/link.c
index 55f6bbd..7cca8b4 100644
--- a/lib/route/link.c
+++ b/lib/route/link.c
@@ -1054,6 +1054,7 @@ int rtnl_link_build_change_request(struct rtnl_link *old,
struct nl_msg **result)
{
struct nl_msg *msg;
+ struct nlattr *af_spec;
struct ifinfomsg ifi = {
.ifi_family = old->l_family,
.ifi_index = old->l_index,
@@ -1113,9 +1114,14 @@ int rtnl_link_build_change_request(struct rtnl_link *old,
nla_nest_end(msg, info);
}
+ if (!(af_spec = nla_nest_start(msg, IFLA_AF_SPEC)))
+ goto nla_put_failure;
+
if (do_foreach_af(tmpl, af_fill, msg) < 0)
goto nla_put_failure;
+ nla_nest_end(msg, af_spec);
+
*result = msg;
return 0;