aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-check/check.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-08 17:12:04 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-08 17:14:54 +0200
commit9f9845eb28f0b516d36cb5478bae8dd5714733f1 (patch)
tree7515b5af3897436ee3b606946982f6e885e6020a /tools/syz-check/check.go
parent3fe0c531c7c1ec6719c42290c8f34d6b381fc690 (diff)
tools/syz-check: improve warning for NLA_REJECT
Diffstat (limited to 'tools/syz-check/check.go')
-rw-r--r--tools/syz-check/check.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go
index 81f1e9e05..58f34c6fb 100644
--- a/tools/syz-check/check.go
+++ b/tools/syz-check/check.go
@@ -671,8 +671,10 @@ func checkAttrType(typ *prog.StructType, payload prog.Type, policy nlaPolicy) st
if typ.TemplateName() != nlattrT || payload.TemplateName() != "nla_bitfield32" {
return "should be nlattr[nla_bitfield32]"
}
- case NLA_NESTED_ARRAY, NLA_REJECT:
- return fmt.Sprintf("unhandled type %v", policy.typ)
+ case NLA_NESTED_ARRAY:
+ return "unhandled type NLA_NESTED_ARRAY"
+ case NLA_REJECT:
+ return "NLA_REJECT attribute will always be rejected"
}
return ""
}