aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/linux_common.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-04-16 21:11:10 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-04-16 21:11:10 +0200
commitf24e540fe513e68ef556ee72042101c536b4ea22 (patch)
treef82bd34668215e9f622f52da55f81e595b12fe94 /pkg/csource/linux_common.go
parent61155cf882e58826d0efa2c7d2e2796080c93923 (diff)
executor: don't fail if IPv6 is not enabled
Diffstat (limited to 'pkg/csource/linux_common.go')
-rw-r--r--pkg/csource/linux_common.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go
index 31418a16c..7cadc60c6 100644
--- a/pkg/csource/linux_common.go
+++ b/pkg/csource/linux_common.go
@@ -2522,8 +2522,14 @@ static void checkpoint_iptables(struct ipt_table_desc* tables, int num_tables, i
int fd, i;
fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
- if (fd == -1)
+ if (fd == -1) {
+ switch (errno) {
+ case EAFNOSUPPORT:
+ case ENOPROTOOPT:
+ return;
+ }
fail("socket(%d, SOCK_STREAM, IPPROTO_TCP)", family);
+ }
for (i = 0; i < num_tables; i++) {
struct ipt_table_desc* table = &tables[i];
strcpy(table->info.name, table->name);