Build for Netgear R7800

Anyone found an easy way to include the following patch into the compilation process?

--- a/net/ipv6/route.c  2022-04-12 09:56:24.349128979 -0700
+++ b/net/ipv6/route.c  2022-04-14 19:38:02.503784856 -0700
@@ -1416,7 +1416,7 @@
                p = this_cpu_ptr(res->nh->rt6i_pcpu);
                prev = xchg(p, NULL);
                if (prev) {
-                       dst_dev_put(&prev->dst);
+                       //dst_dev_put(&prev->dst);
                        dst_release(&prev->dst);
                }

@@ -1473,7 +1473,7 @@
         */
        from = xchg((__force struct fib6_info **)&rt6_ex->rt6i->from, NULL);
        fib6_info_release(from);
-       dst_dev_put(&rt6_ex->rt6i->dst);
+       //dst_dev_put(&rt6_ex->rt6i->dst);

        hlist_del_rcu(&rt6_ex->hlist);
        dst_release(&rt6_ex->rt6i->dst);
@@ -3577,7 +3577,7 @@
                        ppcpu_rt = per_cpu_ptr(fib6_nh->rt6i_pcpu, cpu);
                        pcpu_rt = *ppcpu_rt;
                        if (pcpu_rt) {
-                               dst_dev_put(&pcpu_rt->dst);
+                               //dst_dev_put(&pcpu_rt->dst);
                                dst_release(&pcpu_rt->dst);
                                *ppcpu_rt = NULL;
                        }
@@ -3602,7 +3602,7 @@
                ppcpu_rt = per_cpu_ptr(fib6_nh->rt6i_pcpu, cpu);
                pcpu_rt = xchg(ppcpu_rt, NULL);
                if (pcpu_rt) {
-                       dst_dev_put(&pcpu_rt->dst);
+                       //dst_dev_put(&pcpu_rt->dst);
                        dst_release(&pcpu_rt->dst);
                }
        }

Maybe a bit off topic but, since I'm using this build: I don't have Grafana data from SQM stats, using the SQM dashboard as default, all the queries are empty: Screenshot. All the other stats are working, just the SQM queries aren't there...

Looks like there's no "sqm_xyz" value in my DB, why this? I have the graphs on the LuCI interface.

Pictures explain better:

There's a way to inspect/view the InfluxDB database that rrdtool is sending from the router?

Thanks

It is offtopic. The build contains no Grafana or InfluxDB.
I have no knowledge about those.
You should ask them in a separate thread, labeled clearly, so that people knowledgeable about those would notice your question.

1 Like

Can't install ipset and dnsmasq-full on stable openwrt-22.03 (owrt2203-r19370-e90f74feb6-20220519) or in master build because of missing kmod-ipt-ipset dependency. Maybe also openvpn-openssl in master (because of kmod-tun dependency). There is no such issue in v21.02.

Can you please add kmod-ipt-ipset, kmod-tun and other missing packages, as it was in v21.02?

Logs for v22.03:

# opkg install ipset
Installing ipset (7.15-2) to root...
Downloading https://downloads.openwrt.org/releases/22.03-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/base/ipset_7.15-2_arm_cortex-a15_neon-vfpv4.ipk
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.116-1-7d02f6b387e4ac9273545d8a6168f147) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ipset:
 *      kernel (= 5.10.116-1-7d02f6b387e4ac9273545d8a6168f147)
 * opkg_install_cmd: Cannot install package ipset.

# opkg install dnsmasq-full
Installing dnsmasq-full (2.86-13) to root...
Collected errors:
Downloading https://downloads.openwrt.org/releases/22.03-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/base/dnsmasq-full_2.86-13_arm_cortex-a15_neon-vfpv4.ipk
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.116-1-7d02f6b387e4ac9273545d8a6168f147) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for dnsmasq-full:
 *      kernel (= 5.10.116-1-7d02f6b387e4ac9273545d8a6168f147)
 * opkg_install_cmd: Cannot install package dnsmasq-full.

Logs for master:

# opkg install ipset
Installing ipset (7.15-2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/base/ipset_7.15-2_arm_cortex-a15_neon-vfpv4.ipk
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-reject
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-ipt
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-log
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-ipt-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nfnetlink
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ipset:
 *      kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7)
 * opkg_install_cmd: Cannot install package ipset.

# opkg install dnsmasq-full
Installing dnsmasq-full (2.86-14) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/base/dnsmasq-full_2.86-14_arm_cortex-a15_neon-vfpv4.ipk
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-reject
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-ipt
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-log
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-ipt-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nfnetlink
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-conntrack
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-nf-conntrack-netlink
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for dnsmasq-full:
 *      kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7)
 * opkg_install_cmd: Cannot install package dnsmasq-full.

# opkg install openvpn-openssl
Installing openvpn-openssl (2.5.6-1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/packages/openvpn-openssl_2.5.6-1_arm_cortex-a15_neon-vfpv4.ipk
Installing liblzo2 (2.10-4) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/packages/liblzo2_2.10-4_arm_cortex-a15_neon-vfpv4.ipk
Configuring liblzo2.
Configuring openvpn-openssl.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.115-1-31fbea74b7f1d19caaeac20c731bf7b7) for kmod-tun
1 Like

I've been meaning to post this request as well. Trying to get VPN policy routing or PBR working on that build with similar errors.

opkg install vpn-policy-routing
Installing vpn-policy-routing (0.3.4-8) to root...
Downloading https://downloads.openwrt.org/releases/22.03-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/packages/vpn-policy-routing_0.3.4-8_all.ipk
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.113-1-7d02f6b387e4ac9273545d8a6168f147) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for vpn-policy-routing:
 * 	kernel (= 5.10.113-1-7d02f6b387e4ac9273545d8a6168f147)
 * opkg_install_cmd: Cannot install package vpn-policy-routing.

opkg install pbr-ipt
Installing pbr-ipt (0.9.4-10) to root...
Downloading https://repo.openwrt.melmac.net/pbr-ipt_0.9.4-10_all.ipk
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.113-1-7d02f6b387e4ac9273545d8a6168f147) for kmod-ipt-ipset
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipset found, but incompatible with the architectures configured
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for pbr-ipt:
 * 	kernel (= 5.10.113-1-7d02f6b387e4ac9273545d8a6168f147)
 * opkg_install_cmd: Cannot install package pbr-ipt.

kmod-tun is already there both in master and 22.03.

The kmod-ipt-ipset got left out in the firewall4 transition due to pakcage dependencies, as I think that ipset doesn't work with nftables, (so e.g. banip and bcp38 may have trouble can caused dependency errors.) But I could try adding ipset back.

EDIT: I added it back. Newest master build already has it, and the next 22.03 will have it.

2 Likes

Thank you. Yes, seems nftables makes troubles.

# iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE
iptables v1.8.7 (nf_tables): Chain 'MASQUERADE' does not exist
Try `iptables -h' or 'iptables --help' for more information.

# iptables-legacy -t nat -I POSTROUTING -o tun0 -j MASQUERADE
iptables v1.8.7 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

# iptables --wait -D FORWARD -i br-lan -o tun0 -m conntrack --ctstate NEW -j ACCEPT
iptables v1.8.7 (nf_tables): Couldn't load match `conntrack':No such file or directory

Maybe try to add kmod-ipt-nat, kmod-ipt-nat6, kmod-ipt-conntrack, ip6tables-mod-nat?

I think that you are trying to setup/modify the old iptables based firewall, while there is now the nftables based firewall.

Table & chain names are different etc.

You likely need to adapt your commands for that.

Maybe you're right and I need to rewrite all scripts and rules. I just tried to avoid it and use compatibility layer of iptables-nft and iptables-legacy (they expect to coexist with nftables in recent kernels).

I was able to make my scripts working: nftables + ipset + dnsmasq (still using old ipset) in v22.03. For anyone will follow, to make ipset working in v22.03, need to use command iptables (alias to command iptables-nft), it will use old ipset tables, but will add rules to new nftables.

For example, to mark all packets destination to ipset table, working in v22.02+:

iptables -t mangle -I PREROUTING -m set --match-set my-ipset-list dst,src -j MARK --set-mark 1

This will work with dnsmasq ipset, while nftables support is not released yet.
Required packages for this mix: kmod-ipt-ipset, iptables-nft, ipset, dnsmasq-full, kmod-tun.

1 Like

Hello @hnyman. I have used your builds extensively when I had my R7800. They were stable and came with great features out of the box. I have since had the need to have a more power router. One that can handle higher speeds with SQM enabled. I know I am taking a loooooong shot here, but who knows what the outcome might be. Could you be tempted to do a similar build for the Belkin RT3200?

I actually have currently also an RT3200 and are building for it.
I have occasionally uploaded the build to dropbox, but I have no intention to start a proper community build for it.
Fel free to try the build and modify it to your needs.

Thank you @hnyman. There seems to be a password on your build. Could I have it?

You mean OpenWrt password? To my knowledge the build does has just the default empty root password.

When I flashed the build, the login screen asked me for a password. Naturally, I just clicked on login. It kept requesting the password. I managed to bypass the password by going into failsafe mode and setting it to what I needed it to. Thanks again for the build, so far it seems fairly stable and packages are performing as I expect from your high calibre builds.

Update: after flashing the router again, I came across the same login issue; however, what I have found is that leaving the luci page open long enough and then attempting to login again seems to allow me to get pass the login screen without entering a password. I am not sure what the cause for the delay might be.

Your latest 22.03 build is working great with pbr now. Thanks!

1 Like

Is it normal that each time the router reboots, system time is resetted to "Sun May 29 16:21:30 2022" (i think the build time)?

If i look at syslog, lines during boot are logged with that time, with several errors like

Sun May 29 16:21:30 2022 daemon.err collectd[3195]: rrdtool plugin: rrd_update_r failed: /root/lib/rrd/golconda/conntrack/conntrack-max.rrd: illegal attempt to update using time 1653834091 when last update time is 1654690330 (minimum one second step)".

After a while (i think when NTP client updates the time), the time is setted to the right one.

Shouldn't the system time be in persistent memory?

Yes, that is normal. These devices don't have an rtc, even less a battery-backed rtc, time will be off until ntp succeeded.

1 Like

Software Flow Offloading was merged and therefore is fixed now.
For everyone who had IPv6 packet loss issues.
:grinning:

Adding to the answer from slh, the date is the date of the most recent file in /etc

You could touch a file there to get today's time at the next boot.

2 Likes