linux-omap 2.6.37: update defconfig to make ds1307 builtin
[openembedded.git] / recipes / iptables / iptables-1.3.8 / getsockopt-failed.patch
blobbba9bdaafba4abf7e8c16686ed0e2503da8b48cc
1 This patch fixes an issue where iptables throws the following error:
2 "getsockopt failed strangely". This patch is taken from the netfilter
3 svn (and it's included in iptable 1.4.0rc1):
5 http://svn.netfilter.org/cgi-bin/viewcvs.cgi?rev=6890&view=rev
7 --- iptables/iptables.c 2007/04/30 00:01:39 6815
8 +++ iptables/iptables.c 2007/06/26 15:29:45 6890
9 @@ -1158,7 +1158,7 @@
10 max_rev = getsockopt(sockfd, IPPROTO_IP, opt, &rev, &s);
11 if (max_rev < 0) {
12 /* Definitely don't support this? */
13 - if (errno == EPROTONOSUPPORT) {
14 + if (errno == ENOENT || errno == EPROTONOSUPPORT) {
15 close(sockfd);
16 return 0;
17 } else if (errno == ENOPROTOOPT) {
18 --- iptables/ip6tables.c 2007/06/25 14:55:18 6889
19 +++ iptables/ip6tables.c 2007/06/26 15:29:45 6890
20 @@ -1130,7 +1130,7 @@
21 max_rev = getsockopt(sockfd, IPPROTO_IPV6, opt, &rev, &s);
22 if (max_rev < 0) {
23 /* Definitely don't support this? */
24 - if (errno == EPROTONOSUPPORT) {
25 + if (errno == ENOENT || errno == EPROTONOSUPPORT) {
26 close(sockfd);
27 return 0;
28 } else if (errno == ENOPROTOOPT) {