From f5ccb2d8479ec1a7e7acdf988bd055a30b0286e5 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Tue, 26 Jun 2007 15:29:45 +0000 Subject: Fix "iptables getsockopt failed strangely" when querying revisions for non-existant matches and targets Reported by Joseph Jezak . --- iptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index 893b02d..83b0c82 100644 --- a/iptables.c +++ b/iptables.c @@ -1158,7 +1158,7 @@ static int compatible_revision(const char *name, u_int8_t revision, int opt) max_rev = getsockopt(sockfd, IPPROTO_IP, opt, &rev, &s); if (max_rev < 0) { /* Definitely don't support this? */ - if (errno == EPROTONOSUPPORT) { + if (errno == ENOENT || errno == EPROTONOSUPPORT) { close(sockfd); return 0; } else if (errno == ENOPROTOOPT) { -- cgit v1.2.3