aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-execprog
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-01-31 18:39:24 +0100
committerAndrey Konovalov <andreyknvl@google.com>2017-01-31 18:39:24 +0100
commitdd4e19c77a5326ec907cdf89df0cf9fc41aa17d9 (patch)
tree438ebe7578e66b6ef4daacaad4a7f1fecb0b3a30 /tools/syz-execprog
parent8987a8546dbd1591894bca18a926ab613686eb7c (diff)
execprog: enable tun when syz_emit_ethernet is used
Diffstat (limited to 'tools/syz-execprog')
-rw-r--r--tools/syz-execprog/execprog.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index 03518c2d3..7e0a25d75 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -68,6 +68,16 @@ func main() {
dedupCover = false
}
+ handled := make(map[string]bool)
+ for _, prog := range progs {
+ for _, call := range prog.Calls {
+ handled[call.Meta.CallName] = true
+ }
+ }
+ if handled["syz_emit_ethernet"] {
+ flags |= ipc.FlagEnableTun
+ }
+
var wg sync.WaitGroup
wg.Add(*flagProcs)
var posMu, logMu sync.Mutex