OpenWrt Forum Archive

Topic: qos-scripts and ipt_MARK.o

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have two WRT54G that connect via WDS so that I don't have to run cables around the apartment.  I've upgraded them to Kamikaze 7.09 and am working through the list of things that I'd had set up previously.  I've installed qos-scripts on the "gatekeeper" router (the one that connects everything to the internet) but when I try /etc/init.d/qos start I get a message from iptables about "Unknown arg '--set-mark'."  I think this is being caused by a missing ipt_MARK.o kernel module that does not exist in /lib/modules/2.4.34/.

root@ike:/# ipkg list_installed | grep ipt
iptables - 1.3.7-1 -
iptables-mod-conntrack - 1.3.7-1 -
iptables-mod-filter - 1.3.7-1 -
iptables-mod-imq - 1.3.7-1 -
iptables-mod-ipopt - 1.3.7-1 -
kmod-ipt-conntrack - 2.4.34-brcm-1 -
kmod-ipt-filter - 2.4.34-brcm-1 -
kmod-ipt-imq - 2.4.34-brcm-1 -
kmod-ipt-ipopt - 2.4.34-brcm-1 -
kmod-ipt-nathelper - 2.4.34-brcm-1 -

The iptables package provides libipt_mark.so and libipt_MARK.so but I believe these are the user mode portions of the needed functionality.

root@ike:/# ipkg files iptables
Package iptables (1.3.7-1) is installed on root and has the following files:
/
/etc/
/etc/config/
/etc/config/firewall
/etc/init.d/
/etc/init.d/firewall
/etc/firewall.user
/usr/
/usr/lib/
/usr/lib/firewall.awk
/usr/lib/iptables/
/usr/lib/iptables/libipt_standard.so
/usr/lib/iptables/libipt_icmp.so
/usr/lib/iptables/libipt_tcp.so
/usr/lib/iptables/libipt_udp.so
/usr/lib/iptables/libipt_state.so
/usr/lib/iptables/libipt_limit.so
/usr/lib/iptables/libipt_REJECT.so
/usr/lib/iptables/libipt_mark.so
/usr/lib/iptables/libipt_MARK.so
/usr/lib/iptables/libipt_TCPMSS.so
/usr/lib/iptables/libipt_multiport.so
/usr/lib/iptables/libipt_SNAT.so
/usr/lib/iptables/libipt_DNAT.so
/usr/lib/iptables/libipt_MASQUERADE.so
/usr/sbin/
/usr/sbin/iptables

Finally, a lsmod:

root@ike:/# lsmod
Module                  Size  Used by    Tainted: P
ip_nat_snmp_basic       8912   0 (unused)
ip_nat_pptp             2412   0 (unused)
ip_conntrack_pptp       2940   1
ip_nat_rtsp             5488   0 (unused)
ip_conntrack_rtsp       4816   1
ip_nat_mms              3040   0 (unused)
ip_conntrack_mms        3344   1
ip_nat_h323             2248   0 (unused)
ip_conntrack_h323       2320   1
ip_nat_proto_gre        1552   0 (unused)
ip_conntrack_proto_gre    2256   0 [ip_nat_pptp ip_conntrack_pptp]
ip_conntrack_amanda     1232   0 (unused)
ipt_pkttype              288   0 (unused)
ipt_owner               1280   0 (unused)
ipt_LOG                 3792   0 (unused)
ipt_condition           1360   0 (unused)
wlcompat               14944   0 (unused)
ip_conntrack_tftp       1712   0 (unused)
ip_nat_irc              2336   0 (unused)
ip_conntrack_irc        3128   1
ip_nat_ftp              2960   0 (unused)
ip_conntrack_ftp        4272   1
ipt_unclean             6832   0 (unused)
ipt_TTL                  944   0 (unused)
ipt_ttl                  496   0 (unused)
ipt_TOS                  976   0 (unused)
ipt_time                1544   0 (unused)
ipt_tos                  304   0 (unused)
ipt_tcpmss               656   0 (unused)
ipt_mac                  544   0 (unused)
ipt_length               336   0 (unused)
ipt_ECN                 1616   0 (unused)
ipt_ecn                  656   0 (unused)
ipt_DSCP                 960   0 (unused)
ipt_dscp                 304   0 (unused)
ipt_CLASSIFY             704   0 (unused)
imq                     2384   0 (unused)
ipt_IMQ                  672   0 (unused)
ipt_string              3240   0 (unused)
ipt_layer7             10752   0 (unused)
ipt_ipp2p               7320   0 (unused)
ipt_recent              8208   0 (unused)
ipt_connbytes           1168   0 (unused)
ipt_helper               560   0 (unused)
ipt_conntrack           1104   0 (unused)
ipt_CONNMARK             816   0 (unused)
ipt_connmark             352   0 (unused)
ppp_async               7884   0 (unused)
ppp_generic            22300   0 [ppp_async]
slhc                    6064   0 [ppp_generic]
wl                    630776   0 (unused)
switch-robo             4540   0 (unused)
switch-core             4864   0 [switch-robo]
diag                   25520   0 (unused)

What package do I need to install ipt_MARK.o/ipt_mark.o or is there some other problem?

works for me in kk 7.09, here some info about my router, try running the same commands on yours and show us the output?

# ipkg search *ipt_MARK*
iptables - 1.3.7-1 - /usr/lib/iptables/libipt_MARK.so
Done.

# lsmod | grep -i mark
ipt_CONNMARK             816   2
ipt_connmark             352   0 (unused)

# grep -i mark /proc/net/ip_tables_*
/proc/net/ip_tables_matches:connmark
/proc/net/ip_tables_matches:mark
/proc/net/ip_tables_targets:CONNMARK
/proc/net/ip_tables_targets:MARK

It would also help if you could get at the exact iptables command that causes the error. I don't know how to do this with sh, but with bash you can just put '#!/bin/bash -x' and it will print every command before executing it, making it much easier to debug iptables scripts.

All those commands produce the same output on my router.  I just tried uninstalling qos-scripts and reinstalling it and it is working now.  Apparently iptables saw me posting on the forum and decided it had better straighten up and fly right :-)  Thanks for the help.

The discussion might have continued from here.