summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2022-01-26 03:13:00 +0300
committerWilliam A. Kennington III <wak@google.com>2022-01-28 02:50:00 +0300
commita8d40479ad9672fe33036cf52296a709d953a73e (patch)
treefeb6300ca0ee547eebaa93a62b44c64a56d0f929
parent71fc1893b0d2c01c4bc649c06720b223bbfa3ec8 (diff)
downloadopenbmc-a8d40479ad9672fe33036cf52296a709d953a73e.tar.xz
meta-google: gbmc-ncsi-config: Direct DHCP workaround
We want to avoid using the dhcp relay for the primary node until our NIC proxying code can handle relayed packets or we turn it off entirely. Change-Id: I465edbe20d4be74c7a560f411e61e95fd89c59d1 Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r--meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in
index a6f5cca626..22cbce3d59 100644
--- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in
+++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in
@@ -21,14 +21,25 @@ echo 'ExecStart=' >>"$override"
# the default port 547. Our relays don't support the source port option needed
# to run on 3967 for our legacy NICs.
systemctl cat gbmc-ncsi-dhcrelay | grep '^ExecStart=' | sed 's, -rp 3967,,' >>"$override"
+
+override=/run/systemd/system/gbmc-br-dhcp.service.d/10-direct.conf
+mkdir -p "$(dirname "$override")"
+echo '[Service]' >"$override"
+echo 'ExecStart=' >>"$override"
+# Switch the gbmcbr interface for the NCSI one to avoid passing the SOLICIT
+# message through the BMC relay.
+systemctl cat gbmc-br-dhcp | grep '^ExecStart=' | sed 's, -i gbmcbr, -i @NCSI_IF@,' >>"$override"
+
systemctl daemon-reload
systemctl reset-failed gbmc-ncsi-dhcrelay
systemctl restart --no-block gbmc-ncsi-dhcrelay
+systemctl reset-failed gbmc-br-dhcp
+systemctl restart --no-block gbmc-br-dhcp
read -r -d '' contents <<EOF
table inet filter {
chain ncsi_legacy_input {
- udp dport 547 accept
+ udp dport {546,547} accept
}
}
EOF