summaryrefslogtreecommitdiff
path: root/lib/route/tc.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2011-03-25 18:13:19 +0100
committerThomas Graf <tgraf@suug.ch>2011-03-25 18:13:19 +0100
commit747b892c91de7a852664f015405d6d37ea2b66b6 (patch)
tree588d4d9b32b8dff40b20f0159884afd1b3692acc /lib/route/tc.c
parent23845e942cc8fdad05f722b384266cb0a166edc3 (diff)
downloadlibnl-747b892c91de7a852664f015405d6d37ea2b66b6.tar.gz
Qdisc API improvements and documentation
Deprecated the functions rtnl_qdisc_change() and rtnl_qdisc_build_change_request() for their lack of being able to specify flags. The new functions rtnl_qdisc_update() and rtnl_qdisc_build_update_request() may be used instead. The old functions are still available though. However, rtnl_qdisc_update() no longer implies NLM_F_REPLACE, it has to specified implicitely to allow updating a qdisc without risking to replace another qdisc. Included detailed documentation of qdisc addition/update/deletion. Introduced APPBUG() macro to let application developer know of API abuse.
Diffstat (limited to 'lib/route/tc.c')
-rw-r--r--lib/route/tc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/route/tc.c b/lib/route/tc.c
index 09ae044..56aa410 100644
--- a/lib/route/tc.c
+++ b/lib/route/tc.c
@@ -189,11 +189,7 @@ int rtnl_tc_msg_build(struct rtnl_tc *tc, int type, int flags,
.tcm_handle = tc->tc_handle,
.tcm_parent = tc->tc_parent,
};
- int req, err = -NLE_MSGSIZE;
-
- req = (TCA_ATTR_IFINDEX | TCA_ATTR_PARENT | TCA_ATTR_KIND);
- if ((tc->ce_mask & req) != req)
- return -NLE_MISSING_ATTR;
+ int err = -NLE_MSGSIZE;
msg = nlmsg_alloc_simple(type, flags);
if (!msg)