diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-01-29 13:44:57 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-02-09 20:14:33 +0100 |
| commit | 033b610ec91096a5791c90761df1289fd33280e6 (patch) | |
| tree | 57863e9e73f2d664640d7c889cd052138017f4a5 /prog | |
| parent | bb826eb26c510f5faa418b8a37302be43d535088 (diff) | |
sys/linux: improve netfilter descriptions
Put the underflow entry at the end.
Entries must end on an unconditional, non-goto entry,
otherwise fallthrough from the last entry is invalid.
Add arp tables support.
Split unspec matches/targets to unspec and inet.
Reset ipv6 and arp tables in executor.
Fix number of counters in tables.
Plus a bunch of assorted fixes for matches/targets.
Diffstat (limited to 'prog')
| -rw-r--r-- | prog/prog.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/prog/prog.go b/prog/prog.go index 7decea907..5247ca8c6 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -430,6 +430,16 @@ func replaceArg(arg, arg1 Arg) { *a = *arg1.(*UnionArg) case *DataArg: *a = *arg1.(*DataArg) + case *GroupArg: + a1 := arg1.(*GroupArg) + if len(a.Inner) != len(a1.Inner) { + panic(fmt.Sprintf("replaceArg: group fields don't match: %v/%v", + len(a.Inner), len(a1.Inner))) + } + a.ArgCommon = a1.ArgCommon + for i := range a.Inner { + replaceArg(a.Inner[i], a1.Inner[i]) + } default: panic(fmt.Sprintf("replaceArg: bad arg kind %#v", arg)) } |
