diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2014-03-12 23:42:39 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-03-13 08:58:47 (GMT) |
commit | a126d66b5835280c995657c8348f2a4fa7b9cb8c (patch) | |
tree | 974d15f7ffd3ed385ce3a37f68dfe19dc0cd9b3f | |
parent | cdfdfb16d0da646995792d7c67ae1ddca9017771 (diff) | |
download | libnl-a126d66b5835280c995657c8348f2a4fa7b9cb8c.zip libnl-a126d66b5835280c995657c8348f2a4fa7b9cb8c.tar.gz libnl-a126d66b5835280c995657c8348f2a4fa7b9cb8c.tar.bz2 |
fill prio and protocol attr bits when parsing cls message
Otherwise, the filter we get from a cls cache can't be used
for removal.
Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | lib/route/cls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/route/cls.c b/lib/route/cls.c index 7a809bb..b7860c3 100644 --- a/lib/route/cls.c +++ b/lib/route/cls.c @@ -368,7 +368,11 @@ static int cls_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, goto errout; cls->c_prio = TC_H_MAJ(cls->c_info) >> 16; + if (cls->c_prio) + cls->ce_mask |= CLS_ATTR_PRIO; cls->c_protocol = ntohs(TC_H_MIN(cls->c_info)); + if (cls->c_protocol) + cls->ce_mask |= CLS_ATTR_PROTOCOL; err = pp->pp_cb(OBJ_CAST(cls), pp); errout: |