summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2021-12-15 13:21:52 +0300
committerWilliam A. Kennington III <wak@google.com>2021-12-16 02:56:47 +0300
commit7356f8ebcb6b0e4c06018c748b7c5771b41e007e (patch)
treeb25eb5ca71f9040d838b5276144e32d616315d91 /meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
parentbdccd86cc18f9dba43fb488797f91d941035254f (diff)
downloadopenbmc-7356f8ebcb6b0e4c06018c748b7c5771b41e007e.tar.xz
meta-google: nftables: Make rule loading atomic
This ensures that all of the rules are processed and unexpected packets are not allowed or blocked by the kernel at any time. Change-Id: Ia7bb1d7f604f8ed1bd9759a23e370d20cb0c690d Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh')
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
index 980f7b6d6..ca4e15a1f 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
@@ -37,9 +37,7 @@ gbmc_br_nft_update() {
mkdir -p -m 755 "$(dirname "$rfile")"
printf '%s' "$contents" >"$rfile"
- echo 'Restarting nftables' >&2
- systemctl reset-failed nftables
- systemctl --no-block restart nftables
+ systemctl reset-failed nftables && systemctl --no-block reload-or-restart nftables || true
}
gbmc_br_nft_hook() {