From: Aras Vaichas <arasv@magellan-technology.com>
To: Netfilter Mailing List <netfilter@lists.netfilter.org>
Subject: getsockopt failed strangely: No such file or directory
Date: Sat, 13 May 2006 20:09:33 +1000 [thread overview]
Message-ID: <4465B05D.6030009@magellan-technology.com> (raw)
Hi,
I'm cross-compiling a static version of iptables-1.3.5 for ARM, Linux 2.6.16.
The only change I made to the distribution was to uncomment the line in Makefile:
NO_SHARED_LIBS = 1
and I export my CC, LD and AR for cross-compiling before I call make.
When I run the binary on my target I get this strange error:
# iptables
getsockopt failed strangely: No such file or directory
I looked in the source code and I'm not sure why this is happening in this part.
I keep suspecting that maybe my kernel isn't configured correctly, but I've
configured the basics:
CONFIG_PACKET=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_CONNTRACK_NETLINK=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_IPRANGE=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_ADDRTYPE=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_RAW=y
Any ideas?
The funny thing is, initially I didn't set the NO_SHARED_LIBS flag and iptables
started up and gave me help, etc. But when I tried to set up a chain, it
would complain about no static libraries (as I would expect). Strange why it
doesn't work in NO_SHARED_LIBS mode.
I tried commenting out the exit() call from the offending line in iptables.c
and iptables seems to work OK. e.g.
--- iptables.c.orig 2006-05-13 19:41:49.000000000 +1000
+++ iptables.c 2006-05-13 19:42:16.000000000 +1000
@@ -1084,7 +1084,8 @@
} else {
fprintf(stderr, "getsockopt failed strangely: %s\n",
strerror(errno));
- exit(1);
+ return (0);
}
}
close(sockfd);
regards,
Aras Vaichas
reply other threads:[~2006-05-13 10:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4465B05D.6030009@magellan-technology.com \
--to=arasv@magellan-technology.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.