aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-execprog
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-05-18 10:01:22 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-05-18 10:01:22 +0200
commit61ef28da7aa5d289f8208eab4462f7e6b1aba141 (patch)
tree19495ebf770eee8bd54d633d8d3aff4aa72c0867 /tools/syz-execprog
parentc992b76711c1717f8510a88540e56130437f9cda (diff)
tools/syz-execprog: restore the previous tun disabling logic
This probably can break some things. I feel that tun setup can affect other things even if syz_emit_ethernet/syz_extract_tcp_res are not used. So it can make sense to setup tun even if they are not used. But let's be more careful.
Diffstat (limited to 'tools/syz-execprog')
-rw-r--r--tools/syz-execprog/execprog.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index ff7e6d838..40aa521ce 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -226,5 +226,8 @@ func createConfig(entries []*prog.LogEntry) (*ipc.Config, *ipc.ExecOpts) {
handled[call.Meta.CallName] = true
}
}
+ if handled["syz_emit_ethernet"] || handled["syz_extract_tcp_res"] {
+ config.Flags |= ipc.FlagEnableTun
+ }
return config, execOpts
}