Skip to content

Commit

Permalink
Fail gracefully if IPV6 is not supported
Browse files Browse the repository at this point in the history
Resolves #3789
  • Loading branch information
rocallahan committed Aug 17, 2024
1 parent 4f73299 commit 03f6446
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/netfilter_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ int main(void) {
}

int sock_fd = socket(AF_INET6, SOCK_RAW, IPPROTO_RAW);
if (sock_fd < 0 && errno == EAFNOSUPPORT) {
atomic_puts("IPV6 not supported, skipping test");
atomic_puts("EXIT-SUCCESS");
return 0;
}
test_assert(sock_fd >= 0);

struct ip6t_getinfo* info;
Expand Down

0 comments on commit 03f6446

Please sign in to comment.