From: Cong Wang Date: Wed, 4 Dec 2013 04:16:11 +0000 (-0800) Subject: add an assertion in rtnl_tc_set_link() X-Git-Tag: libnl3_2_24rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea0eec9d3004078b1bdb2b03ee7b0f65a1bdde91;p=thirdparty%2Flibnl.git add an assertion in rtnl_tc_set_link() So that we can catch the bug easily. Signed-off-by: Cong Wang Signed-off-by: Thomas Graf --- diff --git a/lib/route/tc.c b/lib/route/tc.c index fbc5c7e..0886e8e 100644 --- a/lib/route/tc.c +++ b/lib/route/tc.c @@ -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;