summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2021-11-05 11:31:59 +0300
committerWilliam A. Kennington III <wak@google.com>2021-12-04 04:09:21 +0300
commit21e7e45b77e026689b72f182aca4ba2ffd5e0a36 (patch)
tree8d77b2468c741a22404a97528dda914338593ff5 /meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
parenteefb1dde08064d8400a9107500dde5d26ebad63b (diff)
downloadopenbmc-21e7e45b77e026689b72f182aca4ba2ffd5e0a36.tar.xz
meta-google: gbmc-bridge: Provision NCSI deprecated addresses
This scans the gbmcbr interface for public addresses, and adds the relevant addresses to the NCSI interface of the BMC. This is required for neighbor discovery to work from prod over the NCSI link, when the addresses do not already exist (BMC DHCP will not have them). Change-Id: I27ff0cd3c4750b752b35399b8a0288db5ac9fe28 Signed-off-by: William A. Kennington III <wak@google.com>
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.in16
1 files changed, 0 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..6144617d4 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
@@ -70,7 +70,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 +80,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