diff options
Diffstat (limited to 'meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in')
-rwxr-xr-x | meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in index 80bd34f04..2788f7f19 100755 --- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in @@ -41,6 +41,9 @@ set_net() { echo "Found prefix $pfx from $rtr" >&2 + # We no longer need NCSId if we are in this configuration + systemctl stop --no-block ncsid@"$NCSI_IF" || true + # Delete any stale IP Addresses from the primary interface as we won't use them UpdateIP xyz.openbmc_project.Network "$NCSI_IF" '0.0.0.0' '0' || true UpdateIP xyz.openbmc_project.Network "$NCSI_IF" '::' '0' || true @@ -70,7 +73,6 @@ EOF touch -c /lib/systemd/network/*-bmc-gbmcbr.network || true contents='[Network]'$'\n' - contents+="Address=$pfx/128"$'\n' contents+="Gateway=$rtr"$'\n' for file in /run/systemd/network/{00,}-bmc-"$NCSI_IF".network.d/49-public-ra.conf; do mkdir -p -m 755 "$(dirname "$file")" @@ -81,21 +83,6 @@ EOF if [ "$(systemctl is-active systemd-networkd)" != 'inactive' ]; then networkctl reload && networkctl reconfigure gbmcbr "$NCSI_IF" || true fi - - read -r -d '' contents <<EOF -table inet filter { - chain ncsi_input { - ip6 saddr != $pfx/76 ip6 daddr $pfx/76 goto ncsi_gbmc_br_pub_input - } - chain ncsi_forward { - ip6 saddr != $pfx/76 ip6 daddr $pfx/76 accept - } -} -EOF - rfile=/run/nftables/40-gbmc-ncsi-ra.rules - mkdir -p -m 755 "$(dirname "$rfile")" - printf '%s' "$contents" >"$rfile" - systemctl reset-failed nftables && systemctl --no-block restart nftables || true } w=60 |