yeahComments like these are quite frankly self entitled and disrespectful.
IMQ@NAT kernel modul issue
Moderator: Moderators
Re: IMQ@NAT kernel modul issue
@Lantis
Re: IMQ@NAT kernel modul issue
For example:Lantis wrote:It isn’t as straight forward as comparing the two.
Code: Select all
imq.c original:
static int __net_init imq_init_hooks(void)
{
yours:
static int __init imq_init_hooks(void)
{
Code: Select all
nf_queue.c original:
{
int status = -ENOENT;
struct nf_queue_entry *entry = NULL;
const struct nf_afinfo *afinfo;
const struct nf_queue_handler *qh;
struct net *net = state->net;
yours:
{
int status = -ENOENT;
struct nf_queue_entry *entry = NULL;
const struct nf_queue_handler *qh;
struct net *net = state->net;
unsigned int route_key_size;
Re: IMQ@NAT kernel modul issue
Here's a fix
: https://github.com/ericpaulbishop/gargo ... 097cc0dfae
Here's a new build test: viewtopic.php?f=14&t=12020#p53354

Here's a new build test: viewtopic.php?f=14&t=12020#p53354
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Re: IMQ@NAT kernel modul issue
Their patch isn’t suitable as it is.
The init/netinit doesn’t appear to make a difference.
Just try the fix I already put up days ago.
The init/netinit doesn’t appear to make a difference.
Just try the fix I already put up days ago.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: IMQ@NAT kernel modul issue
Tested version: 1.11.X (Built 20190519-0727 git@5834a1ca)
I've noticed a new version of IMQ driver:
However, the error loading the iptable_nat kernel module still remains
.
I've noticed a new version of IMQ driver:
Code: Select all
IMQv4: Hooking IMQ after mangle on PREROUTING, pf=2, hooknum=0, priority=-149
IMQv6: Hooking IMQ after mangle on PREROUTING, pf=10, hooknum=0, priority=-149
IMQv4: Hooking IMQ after nat on POSTROUTING, pf=2, hooknum=4, priority=101
IMQv6: Hooking IMQ after nat on POSTROUTING, pf=10, hooknum=4, priority=101
IMQ driver loaded successfully. (numdevs = 2, numqueues = 1, imq_dev_accurate_stats = 1)

Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Re: IMQ@NAT kernel modul issue
I didn’t say it would.
If you want it solved you’ll need to come up with a solution and post it to me because I can’t produce the error at will.
Remaining options (in order of preference):
1. Sooner or later start order of IMQ
2. Change parameters of IMQ start
3. Don’t load IMQ at all (until needed by the firewall). I’d only allow 3 if it did not ruin any other functionality.
For point 2, you can also try avoiding the NAT hook when it loads to see if that makes a difference.
Modify the file that loads IMQ to include the following parameters:
numdevs=1 hook_chains="INPUT,FORWARD" hook_tables="mangle,mangle"
If you want it solved you’ll need to come up with a solution and post it to me because I can’t produce the error at will.
Remaining options (in order of preference):
1. Sooner or later start order of IMQ
2. Change parameters of IMQ start
3. Don’t load IMQ at all (until needed by the firewall). I’d only allow 3 if it did not ruin any other functionality.
For point 2, you can also try avoiding the NAT hook when it loads to see if that makes a difference.
Modify the file that loads IMQ to include the following parameters:
numdevs=1 hook_chains="INPUT,FORWARD" hook_tables="mangle,mangle"
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: IMQ@NAT kernel modul issue
So it is really annoying. Maybe we'll find it out in time.
1. I found that changing the priority is meaningless (/tmp/overlay/upper/etc/modules.d/* is missing), it was a mistake
:
I can only prioritize by creating a link in /etc/modules-boot.d/. Even in this way, the error sometimes occurs.
2. I don't know how I could change the startup parameters when I load the kernel modules /sbin/kmodloader with the program or use the modprobe command.
3. That's good for me because I don't use QoS, but what about other users? In any case, the Gargoyle's inoperative service - I don't see it as a good solution.
1. I found that changing the priority is meaningless (/tmp/overlay/upper/etc/modules.d/* is missing), it was a mistake

Code: Select all
[3.496380] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[3.554450] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[7.282533] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[7.289923] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[8.098607] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[8.163266] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[9.888800] kmodloader: loading kernel modules from /etc/modules.d/*
[15.674480] kmodloader: done loading kernel modules from /etc/modules.d/*
2. I don't know how I could change the startup parameters when I load the kernel modules /sbin/kmodloader with the program or use the modprobe command.
3. That's good for me because I don't use QoS, but what about other users? In any case, the Gargoyle's inoperative service - I don't see it as a good solution.
Last edited by RomanHK on Wed May 22, 2019 1:48 pm, edited 1 time in total.
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Re: IMQ@NAT kernel modul issue
As a working solution, I have modified /etc/init.d/boot as follows:
These are lines 41 and 42:
I already use this method for a month, so far without errors.
Yes, 1% of users may find that the router loops, but what is important to us? Those who do not have a problem with IMQ@NAT are not affected.
Code: Select all
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=10
STOP=98
uci_apply_defaults() {
. /lib/functions/system.sh
cd /etc/uci-defaults || return 0
files="$(ls)"
[ -z "$files" ] && return 0
mkdir -p /tmp/.uci
for file in $files; do
( . "./$(basename $file)" ) && rm -f "$file"
done
uci commit
}
boot() {
[ -f /proc/mounts ] || /sbin/mount_root
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
[ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
mkdir -p /var/run
mkdir -p /var/log
mkdir -p /var/lock
mkdir -p /var/state
mkdir -p /var/tmp
mkdir -p /tmp/.uci
chmod 0700 /tmp/.uci
touch /var/log/wtmp
touch /var/log/lastlog
touch /tmp/resolv.conf.auto
ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
/sbin/kmodloader
# IMQ@NAT kernel modul issue
[ -z `cat /proc/net/ip_tables_names | grep nat` ] && reboot -f
[ ! -f /etc/config/wireless ] && {
# compat for brcm47xx and mvebu
sleep 1
}
/bin/config_generate
uci_apply_defaults
# temporary hack until configd exists
/sbin/reload_config
}
Code: Select all
# IMQ@NAT kernel modul issue
[ -z `cat /proc/net/ip_tables_names | grep nat` ] && reboot -f
Yes, 1% of users may find that the router loops, but what is important to us? Those who do not have a problem with IMQ@NAT are not affected.
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Re: IMQ@NAT kernel modul issue
You can adjust the file at /etc/modules.d/46-it-imq and add the parameters inside the file after the imq module name.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: IMQ@NAT kernel modul issue
Yes, the parameters seem to have helped me
. I'll test in a longer time interval. I'd like someone else to try.
Procedure:
1. copy the file from /etc/modules.d/46-ipt-imq to /etc/modules-boot.d/46-ipt-imq
2. Edit /etc/modules-boot.d/46-ipt-imq as follows: 3. Restart the router
Log output:
Question:
Will these parameters not interfere with Gargoyle's functionality (eg QoS)?

Procedure:
1. copy the file from /etc/modules.d/46-ipt-imq to /etc/modules-boot.d/46-ipt-imq
2. Edit /etc/modules-boot.d/46-ipt-imq as follows:
Code: Select all
imq numdevs=1 hook_chains="INPUT,FORWARD" hook_tables="mangle,mangle"
xt_IMQ
Log output:
Code: Select all
kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
IMQv4: Hooking IMQ after mangle on INPUT, pf=2, hooknum=1, priority=-149
IMQv6: Hooking IMQ after mangle on INPUT, pf=10, hooknum=1, priority=-149
IMQv4: Hooking IMQ after mangle on FORWARD, pf=2, hooknum=2, priority=-149
IMQv6: Hooking IMQ after mangle on FORWARD, pf=10, hooknum=2, priority=-149
IMQ driver loaded successfully. (numdevs = 1, numqueues = 1, imq_dev_accurate_stats = 1)
kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Will these parameters not interfere with Gargoyle's functionality (eg QoS)?
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0
http://gargoyle.romanhk.cz custom builds by gargoyle users