From: Saravanan Chanemouganandam <schane@osmozis.com>
To: netfilter@vger.kernel.org
Cc: busybox@busybox.net, linux@arm.linux.org.uk
Subject: iptables library loading problem
Date: Tue, 18 Dec 2007 16:05:27 +0100 [thread overview]
Message-ID: <200712181605.28712.schane@osmozis.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 6202 bytes --]
Hi all,
I have an issue in using netfilter iptables and xtables support built into the
linux 2.6.16 kernel image on the arm target platform. The problem is that
when a iptables command is executed with xtables supports, it doesn't find
the required libraries installed in /lib/iptables and instead it looks
into /lib [ open("/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such
file or directory) ] and throws
sara# iptables -t nat -A POSTROUTING -o br_wan -j MASQUERADE
iptables v1.3.8: Couldn't load target `MASQUERADE':File not found
Try `iptables -h' or 'iptables --help' for more information.
Where as it works fine, if I move all /lib/iptables/*.so to /lib. Is there
anything Iam missing like symbolic links or PATH, while installing iptables
using make BINDIR=../root/sbin LIBDIR=../root/lib install
Here is the strace message of
sara#strace iptables -t nat -A POSTROUTING -o br_wan -j MASQUERADE
execve("/sbin/iptables", ["iptables", "-t", "nat", "-A", "POSTROUTING", "-o",
"br_wan", "-j", "MASQUERADE"],0
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40005000
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=698, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
mmap2(NULL, 698, PROT_READ, MAP_SHARED, 3, 0) = 0x40006000
close(3) = 0
open("/lib/libdl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=8900, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40007000
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0(\10\0\000"..., 4096) =
4096
mmap2(NULL, 40960, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000e000
mmap2(0x4000e000, 5824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) =
0x4000e000
mmap2(0x40017000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) =
0x40017000
close(3) = 0
munmap(0x40007000, 4096) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=60315, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40007000
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320\31\0"..., 4096) =
4096
mmap2(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
mmap2(0x40018000, 34728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) =
0x40018000
mmap2(0x40028000, 2380, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8) =
0x40028000
close(3) = 0
munmap(0x40007000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=227484, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40007000
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\201\0\000"..., 4096)
= 4096
mmap2(NULL, 278528, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40029000
mmap2(0x40029000, 222048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) =
0x40029000
mmap2(0x40067000, 4960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x36)
= 0x40067000
mmap2(0x40069000, 13592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0x40069000
close(3) = 0
munmap(0x40007000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=227484, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=227484, ...}) = 0
close(3) = 0
munmap(0x40006000, 698) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=21096, ...}) = 0
mprotect(0x40017000, 4096, PROT_READ) = 0
mprotect(0x40067000, 4096, PROT_READ) = 0
mprotect(0x4000c000, 4096, PROT_READ) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) =
0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) =
0
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=698, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
mmap2(NULL, 698, PROT_READ, MAP_SHARED, 3, 0) = 0x40006000
close(3) = 0
open("/home/sara/BuildRoot/buildroot/project_build_arm/uclibc/root/lib/iptables/libipt_MASQUERADE.so",
O_RDO)
open("/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
munmap(0x40006000, 698) = 0
brk(0) = 0x1c000
brk(0x1d000) = 0x1d000
socket(PF_INET, SOCK_RAW, IPPROTO_RAW) = 3
getsockopt(3, SOL_IP, 0x40 /* IP_??? */,
"nat\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [84])0
getsockopt(3, SOL_IP, 0x41 /* IP_??? */,
"nat\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [656]0
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=698, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
mmap2(NULL, 698, PROT_READ, MAP_SHARED, 4, 0) = 0x40006000
close(4) = 0
open("/home/sara/BuildRoot/buildroot/project_build_arm/uclibc/root/lib/iptables/libipt_MASQUERADE.so",
O_RDO)
open("/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libipt_MASQUERADE.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
munmap(0x40006000, 698) = 0
write(2, "iptables", 8iptables) = 8
write(2, " v", 2 v) = 2
write(2, "1.3.8", 51.3.8) = 5
write(2, ": ", 2: ) = 2
write(2, "Couldn\'t load target `", 22Couldn't load target `) = 22
write(2, "MASQUERADE", 10MASQUERADE) = 10
write(2, "\':", 2':) = 2
write(2, "File not found", 14File not found) = 14
write(2, "\n", 1
) = 1
Can anybody tell me why it doesnt find the needed libraries in
the /lib/iptables ?
Thanks
Sara
[-- Attachment #1.2: Type: text/html, Size: 7762 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
reply other threads:[~2007-12-18 15:05 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=200712181605.28712.schane@osmozis.com \
--to=schane@osmozis.com \
--cc=busybox@busybox.net \
--cc=linux@arm.linux.org.uk \
--cc=netfilter@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox