[netfilter-cvslog] r6890 - trunk/iptables
kaber at trash.net
kaber at trash.net
Tue Jun 26 17:29:45 CEST 2007
Author: kaber at trash.net
Date: 2007-06-26 17:29:45 +0200 (Tue, 26 Jun 2007)
New Revision: 6890
Modified:
trunk/iptables/ip6tables.c
trunk/iptables/iptables.c
Log:
Fix "iptables getsockopt failed strangely" when querying revisions for non-existant matches and targets
Reported by Joseph Jezak <josejx at gentoo.org>.
Modified: trunk/iptables/ip6tables.c
===================================================================
--- trunk/iptables/ip6tables.c 2007-06-25 14:55:18 UTC (rev 6889)
+++ trunk/iptables/ip6tables.c 2007-06-26 15:29:45 UTC (rev 6890)
@@ -1130,7 +1130,7 @@
max_rev = getsockopt(sockfd, IPPROTO_IPV6, 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) {
Modified: trunk/iptables/iptables.c
===================================================================
--- trunk/iptables/iptables.c 2007-06-25 14:55:18 UTC (rev 6889)
+++ trunk/iptables/iptables.c 2007-06-26 15:29:45 UTC (rev 6890)
@@ -1158,7 +1158,7 @@
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) {
More information about the netfilter-cvslog
mailing list