aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/linux_common.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-23 13:41:56 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-25 12:46:05 +0200
commit60d6f956a24a242ab7b8fcf0ea22befd962e0493 (patch)
tree8b703d3b099e7231c5ed70535bd68cc800cd2499 /pkg/csource/linux_common.go
parent2675f920652cc9218b4b3dc513c76b0546a5a5ae (diff)
executor: fix reset of bridge netfilter
We left entries non-zero, so memcmp always failed.
Diffstat (limited to 'pkg/csource/linux_common.go')
-rw-r--r--pkg/csource/linux_common.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go
index 8ddced733..0c9d6571e 100644
--- a/pkg/csource/linux_common.go
+++ b/pkg/csource/linux_common.go
@@ -2523,6 +2523,7 @@ static void reset_ebtables()
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INFO, &replace, &optlen))
fail("getsockopt(EBT_SO_GET_INFO)");
replace.num_counters = 0;
+ table->replace.entries = 0;
for (h = 0; h < NF_BR_NUMHOOKS; h++)
table->replace.hook_entry[h] = 0;
if (memcmp(&table->replace, &replace, sizeof(table->replace)) == 0) {
@@ -2541,6 +2542,7 @@ static void reset_ebtables()
j++;
}
}
+ table->replace.entries = table->entrytable;
optlen = sizeof(table->replace) + table->replace.entries_size;
if (setsockopt(fd, SOL_IP, EBT_SO_SET_ENTRIES, &table->replace, optlen))
fail("setsockopt(EBT_SO_SET_ENTRIES)");