summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
diff options
context:
space:
mode:
authordheerajpdsk <p.dheeraj.srujan.kumar@intel.com>2022-05-06 02:48:05 +0300
committerGitHub <noreply@github.com>2022-05-06 02:48:05 +0300
commitca8d06bc610af08c2d3efc487aa9519989b743e6 (patch)
treec557da2136640a8ce48439f19fe5f7071faffeca /meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
parent7cf0c1cd0ce835d1833509b7b911e8a97380278b (diff)
parent18f97faa411078b95d042d207f5fff32bc8ece1d (diff)
downloadopenbmc-ca8d06bc610af08c2d3efc487aa9519989b743e6.tar.xz
Merge pull request #80 from Intel-BMC/updateHEAD1-0.91intel
Update
Diffstat (limited to 'meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in')
-rwxr-xr-xmeta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in19
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