From 033b610ec91096a5791c90761df1289fd33280e6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 29 Jan 2018 13:44:57 +0100 Subject: 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. --- prog/prog.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'prog') 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)) } -- cgit mrf-deployment