add an assertion in rtnl_tc_set_link()

So that we can catch the bug easily.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Cong Wang 2013-12-03 20:16:11 -08:00 committed by Thomas Graf
parent a858d996e9
commit ea0eec9d30

View file

@ -300,6 +300,8 @@ void rtnl_tc_set_link(struct rtnl_tc *tc, struct rtnl_link *link)
if (!link)
return;
if (!link->l_index)
BUG();
nl_object_get(OBJ_CAST(link));
tc->tc_link = link;