From 07e04dbb0a4ebf45e4e6284ea2d629ae2852ffbc Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sun, 26 Sep 2021 21:42:50 -0700 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 } }