1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

conntrack-tools not available on Shibby 1.28 MIPSR2-115 K26, how to add?

Discussion in 'Tomato Firmware' started by blaman, Jan 8, 2014.

  1. blaman

    blaman Reformed Router Member

    This is on a Linksys E4200 v1. I've noticed conntrack-tools do not come with Shibby by default, and they're not in the entware repository either. I understand they're not in entware because they're tied to a specific kernel/module version. I'd like to be able to use them. Could you guys please give me any pointers as to how to compile them, or even, precompiled binaries if someone here has run into this and has kept them around?

    Thanks a lot.
     
    Last edited: Jan 8, 2014
  2. koitsu

    koitsu Network Guru Member

    You can file a ticket with the Entware folks and they can build the package + make it available via opkg as normal.
     
  3. blaman

    blaman Reformed Router Member

    Managed to compile it myself, more or less.

    Code:
    TOMBASE="/home/user/tomato/release/src-rt/router"
    cd /home/user/tomato/release/src-rt/router/conntrack-tools
    LIBNFNETLINK_LIBS="-L$TOMBASE/libnfnetlink/src/.libs -lnfnetlink" LIBNFNETLINK_CFLAGS="-I$TOMBASE/libnfnetlink/include" LIBMNL_LIBS="-L$TOMBASE/libmnl-1.0.2/src/.libs -lmnl" LIBMNL_CFLAGS="-I$TOMBASE/libmnl-1.0.2/include" LIBNETFILTER_CONNTRACK_CFLAGS="-I$TOMBASE/libnetfilter_conntrack-1.0.0/include" LIBNETFILTER_CONNTRACK_LIBS="-L$TOMBASE/libnfnetlink/src/.libs -lnfnetlink -L$TOMBASE/libnetfilter_conntrack-1.0.0/src/.libs -lnetfilter_conntrack -Wl,-rpath -Wl,/lib:/opt/lib" ./configure --host=mipsel-linux-uclibc
    make
    
    This worked. I got a conntrack executable I can run on the router, after placing libnetfilter_conntrack.so.3.2.0 in /opt/lib and creating libnetfilter_conntrack.so.3 as a symlink pointing to it. Then I compiled nf_conntrack_netlink as a module and insmod'd it. Now, conntrack -L gives:

    Code:
    tcp 6 24 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=78 bytes=5826 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=105 bytes=124677 [ASSURED] mark=0 use=1
    tcp 6 1031 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=27 bytes=2783 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=26 bytes=2940 [ASSURED] mark=0 use=1
    tcp 6 1116 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=42 bytes=3044 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=34 bytes=3014 [ASSURED] mark=0 use=1
    udp 17 179 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=20105 bytes=3112301 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=22846 bytes=7222060 [ASSURED] mark=0 use=1
    
    Note that the src and dst IPs are 0.0.0.0.

    Any idea as to what could be causing this? The contents of /proc/net/ip_conntrack and /proc/net/nf_conntrack have the correct IPs, so I am not sure what could be the problem.
     
    Last edited: Jan 10, 2014
  4. koitsu

    koitsu Network Guru Member

    Sounds like some kind of parser error in the code itself? You'd have to look at the source of everything and figure out how it works (it may not even use the /proc interface in fact, hard to say). Sorry I can't be of more help. :/
     

Share This Page