From 956210b8f0b28f0a4e0786704e923ec648c40551 Mon Sep 17 00:00:00 2001 From: chr0mag Date: Mon, 18 Nov 2024 14:11:53 -0800 Subject: [PATCH] Fix nftables / device rename race on boot On some boots nftables would start before udev had renamed the wan0 device, causing the service to fail to start. Using 'oifname' instead of 'oif' allows the creation of nftables rules for device that don't exist. --- etc/nftables.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/nftables.conf b/etc/nftables.conf index 0c772d0..fca81db 100644 --- a/etc/nftables.conf +++ b/etc/nftables.conf @@ -5,7 +5,7 @@ table ip filter { chain forward { type filter hook forward priority 0; policy drop; ct state established,related counter accept - iifname "br0" oif "wan0" counter accept + iifname "br0" oifname "wan0" counter accept } chain output { @@ -40,6 +40,6 @@ table ip nat { chain postrouting { type nat hook postrouting priority 100; policy accept; - oif "wan0" counter masquerade + oifname "wan0" counter masquerade } }