[PATCH] tbf: fix false missing attr

Stephane Fillod fillods at users.sf.net
Wed Aug 1 16:29:47 EDT 2012


Fix false missing attribute in tbf_msg_fill() when applying a tbf qdisc.
---

--- libnl-3.2.11/lib/route/qdisc/tbf.c	2012-06-06 12:36:09.000000000 +0200
+++ libnl-3.2.11/lib/route/qdisc/tbf.c	2012-07-12 12:43:07.005204123 +0200
@@ -135,7 +135,7 @@ static int tbf_msg_fill(struct rtnl_tc *
 	struct rtnl_tbf *tbf = data;
 	int required = TBF_ATTR_RATE | TBF_ATTR_LIMIT;
 
-	if (!(tbf->qt_mask & required) != required)
+	if ((tbf->qt_mask & required) != required)
 		return -NLE_MISSING_ATTR;
 
 	memset(&opts, 0, sizeof(opts));



More information about the libnl mailing list