openwrt/packages/luci-app-ocserv/root/etc/uci-defaults/99-luci-app-ocserv-mtu
Ivan Cherniy 31c9925b8c luci-app-ocserv: default MTU 1400 and fq qdisc on wan
Previously uncommitted work: MTU default in the form and uci-defaults,
and a hotplug script that sets the fq qdisc on the wan device.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 10:14:37 +03:00

12 lines
258 B
Shell
Executable file

#!/bin/sh
config=/etc/ocserv/ocserv.conf.template
[ -f "$config" ] || exit 0
if grep -q '^[[:space:]]*mtu[[:space:]]*=' "$config"; then
sed -i 's/^[[:space:]]*mtu[[:space:]]*=.*/mtu = 1400/' "$config"
else
printf '\nmtu = 1400\n' >> "$config"
fi
exit 0