summaryrefslogtreecommitdiff
path: root/lib/route
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-04-22 19:12:10 +0200
committerThomas Haller <thaller@redhat.com>2022-04-22 19:12:26 +0200
commitf50a802ca28d64dd59d312fe77c9b733378e2db0 (patch)
treee20ed3afc74dd022427398d9f961056c41a6ae9c /lib/route
parentfa79ee3615f871948e8cb6dfb941f40d860fe65f (diff)
downloadlibnl-f50a802ca28d64dd59d312fe77c9b733378e2db0.tar.gz
route/u32: fix u32_dump_details() to print data
The if statement was wrong and always true. Drop it, the remaining code handles the cases of no flags already correctly. Error: DEADCODE (CWE-561): libnl-3.6.0/lib/route/cls/u32.c:361: dead_error_condition: The condition "!(u->cu_mask & 0)" must be true. libnl-3.6.0/lib/route/cls/u32.c:366: dead_error_line: Execution cannot reach this statement: "if (!(u->cu_mask & 0x20)) {...". # 364| } # 365|ยทยทยท # 366|-> if (!(u->cu_mask & U32_ATTR_SELECTOR)) { # 367| nl_dump(p, "no-selector"); # 368| } else {
Diffstat (limited to 'lib/route')
-rw-r--r--lib/route/cls/u32.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/route/cls/u32.c b/lib/route/cls/u32.c
index e6c51729..52db2931 100644
--- a/lib/route/cls/u32.c
+++ b/lib/route/cls/u32.c
@@ -358,11 +358,6 @@ static void u32_dump_details(struct rtnl_tc *tc, void *data,
if (!u)
return;
- if (!(u->cu_mask & (U32_ATTR_SELECTOR & U32_ATTR_MARK))) {
- nl_dump(p, "no-selector no-mark\n");
- return;
- }
-
if (!(u->cu_mask & U32_ATTR_SELECTOR)) {
nl_dump(p, "no-selector");
} else {