Files
x1pro/immortalwrt-patches/files/etc/rc.local
T
zhangxiaokun c6c90c1db8 v37 sysupgrade-v37.bin (2026-07-25)
50,473,789 bytes, md5 353fc69dac266a5b7a5dea4647b24eb6.

- LuCI status/channel_analysis.js: 3 patches (freq.band from mhz,
  scan band from channel<=14, deferred graph on tab-active). Same
  mt_wifi capability gap as v36 wireless.js (no freqlist.band, no
  hostapd system features).
- 30-mss-clamp: re-assert net.bridge.bridge-nf-call-{iptables,ip6tables,arptables}=1
  and idempotently re-add nft inet fw4 mangle_forward set 1360 on
  every ifup (was applied silently-skipped at boot before br_netfilter
  module loaded; live module reset defaults to 0, MSS clamp inert,
  Windows 1460B SYNs die at vxlan0).
- rc.local: re-assert bridge-nf sysctls at end of boot (post fw4 / post
  module load) as second belt-and-braces layer.
- wireless.js carried forward from v36 (5 selector patches).

U-Boot flash only (never sysupgrade - fit_do_upgrade silent fails).
WiFi key/preshared_key/network config sanitized.
2026-07-26 15:59:17 +08:00

35 lines
1.9 KiB
Bash

#!/bin/sh
# RPS/RFS tuning for single-RX-queue devices (mtk_soc_eth)
# Distributes softirq across all CPUs; without this, all eth RX runs on CPU0 only.
# Pairs with sysctl tuning in /etc/sysctl.conf (BBR + buffer sizes).
[ -d /sys/class/net/eth1/queues ] && echo 3 > /sys/class/net/eth1/queues/rx-0/rps_cpus
[ -d /sys/class/net/eth0/queues ] && echo 3 > /sys/class/net/eth0/queues/rx-0/rps_cpus
[ -d /sys/class/net/br-lan/queues ] && echo 3 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
[ -d /sys/class/net/ra0/queues ] && echo 3 > /sys/class/net/ra0/queues/rx-0/rps_cpus
[ -d /sys/class/net/rax0/queues ] && echo 3 > /sys/class/net/rax0/queues/rx-0/rps_cpus
echo 32768 > /proc/sys/net/core/rps_sock_flow_entries 2>/dev/null
[ -f /sys/class/net/eth1/queues/rx-0/rps_flow_cnt ] && echo 32768 > /sys/class/net/eth1/queues/rx-0/rps_flow_cnt
[ -f /sys/class/net/br-lan/queues/rx-0/rps_flow_cnt ] && echo 32768 > /sys/class/net/br-lan/queues/rx-0/rps_flow_cnt
# === VXLAN boot fallback (keng #12 part 2) ===
# Hotplug 20-vxlan sometimes misses wg0 ifup at boot (no 10.99 route, no log entry).
# If we got here without vxlan0, manually re-trigger the same script.
[ -e /sys/class/net/vxlan0 ] || ACTION=ifup INTERFACE=wg0 /etc/hotplug.d/net/20-vxlan
# === WiFi band label verifier (v28, log-only) ===
# Aligns UCI wifi labels with physical broadcast once driver is stable.
# Log-only (no uci mutation); see /etc/wifi-band-verify.sh for rationale.
( /etc/wifi-band-verify.sh >/dev/null 2>&1 & )
# === bridge-nf re-assert (keng #6 加固 2026-07-25) ===
# sysctl.d/99-bridge-nf.conf 开机应用时 br_netfilter 可能未加载, 键不存在被静默跳过;
# 模块晚加载后默认值 0 会让 MSS clamp 对桥接流量失效. rc.local 最后兜底.
sysctl -w net.bridge.bridge-nf-call-iptables=1 2>/dev/null
sysctl -w net.bridge.bridge-nf-call-ip6tables=1 2>/dev/null
sysctl -w net.bridge.bridge-nf-call-arptables=1 2>/dev/null
exit 0