LDFLAGS=-pie
$ ./configure CFLAGS="-fPIC -U_FORTIFY_SOURCE" libnftnl_CFLAGS="-fPIC -U_FORTIFY_SOURCE" libnfnetlink_CFLAGS="-fPIC -U_FORTIFY_SOURCE" libmnl_CFLAGS="-fPIC -U_FORTIFY_SOURCE" libnetfilter_conntrack_CFLAGS="-fPIC -U_FORTIFY_SOURCE" libnetfilter_conntrack_LIBS="-pie -rdynamic" libnfnetlink_LIBS="-pie -rdynamic" libmnl_LIBS="-pie" libnftnl_LIBS="-pie -rdynamic" --enable-libipq --with-xtlibdir=/lib/xtables --disable-static
$ make
...
make[2]: Entering directory `/home/richard/Software/iptables/utils'
/bin/bash ../libtool --tag=CC --mode=link gcc -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -fPIC -U_FORTIFY_SOURCE -o nfnl_osf nfnl_osf.o -pie -rdynamic
libtool: link: gcc -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -fPIC -U_FORTIFY_SOURCE -o nfnl_osf nfnl_osf.o -pie -rdynamic
nfnl_osf.o: In function `osf_load_line':
nfnl_osf.c:(.text+0xd77): undefined reference to `nfnl_fill_hdr'
nfnl_osf.c:(.text+0xdb9): undefined reference to `nfnl_fill_hdr'
nfnl_osf.c:(.text+0xde9): undefined reference to `nfnl_addattr_l'
nfnl_osf.c:(.text+0xe29): undefined reference to `nfnl_talk'
nfnl_osf.o: In function `main':
nfnl_osf.c:(.text+0x109c): undefined reference to `nfnl_open'
nfnl_osf.c:(.text+0x110b): undefined reference to `nfnl_subsys_open'
nfnl_osf.c:(.text+0x117f): undefined reference to `nfnl_subsys_close'
nfnl_osf.c:(.text+0x118f): undefined reference to `nfnl_subsys_close'
nfnl_osf.c:(.text+0x119d): undefined reference to `nfnl_close'
nfnl_osf.c:(.text+0x11b2): undefined reference to `nfnl_close'
collect2: error: ld returned 1 exit status
make[2]: *** [nfnl_osf] Error 1
iptables -A PREROUTING -t mangle -m state --state NEW -j MARK --set-mark 1
dce.SetBinary ("xtables-multi");
dce.ResetArguments ();
dce.ResetEnvironment ();
dce.AddArgument ("iptables");
dce.AddArgument("-A");
dce.AddArgument("PREROUTING");
dce.AddArgument("-t");
dce.AddArgument("mangle");
dce.AddArgument("-m");
dce.AddArgument("state");
dce.AddArgument("--state NEW");
dce.AddArgument ("-j");
dce.AddArgument ("MARK");
dce.AddArgument ("--set-mark");
dce.AddArgument ("1");
iptables v1.4.21: Couldn't load match `state':No such file or directory
dce.SetBinary ("xtables-multi");
dce.ResetArguments ();
dce.ResetEnvironment ();
dce.AddArgument ("iptables");
dce.AddArgument ("-L");
apps = dce.Install(nodes.Get(1));
apps.Start(Seconds (2.0));
iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages)
return NULL;
void *vzalloc(unsigned long size)
{
return kmalloc (size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
}
Program received signal SIGSEGV, Segmentation fault.
_dl_debug_initialize (ldbase=ldbase@entry=0, ns=-2) at dl-debug.c:58
58 dl-debug.c: No such file or directory.
(gdb) bt
#0 _dl_debug_initialize (ldbase=ldbase@entry=0, ns=-2) at dl-debug.c:58
#1 0xb7ff0725 in _dl_open (file=0xb579eb7c "/usr/local/lib/xtables/libipt_MASQUERADE.so", mode=-2147483646,
caller_dlopen=0xb5a343ec <load_extension+502>, nsid=<optimised out>, argc=2, argv=0xbfffebc4, env=0x80be000) at dl-open.c:689
#2 0xb65e0cbc in ?? () from elf-cache/0/libdl.so.2
#3 0xb7fecc26 in _dl_catch_error (objname=0xb65e8018, errstring=0xb65e801c, mallocedp=0xb65e8014, operate=0xb65e0c30,
args=0xb579eab0) at dl-error.c:187
#4 0xb65e137c in ?? () from elf-cache/0/libdl.so.2
#5 0xb65e0d71 in dlopen () from elf-cache/0/libdl.so.2
#6 0xb5a343ec in load_extension (search_path=0xb5a3a802 "/usr/local/lib/xtables", af_prefix=0xb5a3a72d "libipt_",
name=0x80c1420 "MASQUERADE", is_target=true) at xtables.c:571
#7 0xb5a3491d in xtables_find_target (name=0x80c1420 "MASQUERADE", tryload=XTF_TRY_LOAD) at xtables.c:725
diff --git a/iptables/xshared.c b/iptables/xshared.c
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -259,7 +259,7 @@ bool xtables_lock(bool wait)
while (1) {
ret = bind(xt_socket, (struct sockaddr*)&xt_addr,
offsetof(struct sockaddr_un, sun_path)+XT_SOCKET_LEN)
- if (ret == 0)
+ if (ret <= 0)
return true;
else if (wait == false)
return false;
CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_NAT=y
CONFIG_NF_NAT_NEEDED=y
CONFIG_NF_NAT_IPV4=y
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/NUlWK-XVmjA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.