aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/init_iptables.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-02-24 14:33:36 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-02-25 18:22:02 +0100
commit9fe8aa42c5bd11e2eb6952a16da6287205d7bf97 (patch)
tree7cf636dd611cb2a338cfeba13607b8e152545f19 /sys/linux/init_iptables.go
parent2145057cb8a50aba1a27a67be19953bee9b164fd (diff)
prog: add arbitrary mutation of complex structs
Squash complex structs into flat byte array and mutate this array with generic blob mutations. This allows to mutate what we currently consider as paddings and add/remove paddings from structs, etc.
Diffstat (limited to 'sys/linux/init_iptables.go')
-rw-r--r--sys/linux/init_iptables.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/linux/init_iptables.go b/sys/linux/init_iptables.go
index d0e776045..86001b4c3 100644
--- a/sys/linux/init_iptables.go
+++ b/sys/linux/init_iptables.go
@@ -117,6 +117,9 @@ func (arch *arch) generateEbtables(g *prog.Gen, typ prog.Type, old prog.Arg) (
arg = old
calls = g.MutateArg(arg)
}
+ if g.Target().ArgContainsAny(arg) {
+ return
+ }
hooksField, entriesField := 4, 7
if g.Target().PtrSize == 8 {
// Account for paddings.
@@ -155,6 +158,7 @@ func (arch *arch) generateEbtables(g *prog.Gen, typ prog.Type, old prog.Arg) (
}
hookArg.Val = addr
}
+ // TODO(dvyukov): assign jump targets for targets.
return
}