summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2023-12-08 02:32:26 +0300
committerWilliam A. Kennington III <wak@google.com>2023-12-12 13:04:42 +0300
commitf31b5c6dbb263370fa657ce9f29ffe80748a95c7 (patch)
tree674711bc67f80ae729f213a471be2d65eab1407c /meta-google
parentdcdd5ec49c727786980642643b04195f4a5f1bed (diff)
downloadopenbmc-f31b5c6dbb263370fa657ce9f29ffe80748a95c7.tar.xz
meta-google: gbmc-ncsi-config: DHCP impersonation disable
We have platforms that should never impersonate the host DHCP as it would override perfectly valid IP address configuration on the BMC. These are newer platforms that guarantee the BMC has a unique address. Change-Id: I6040f6602cb582793c932878078e3669cba04305 Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google')
-rw-r--r--meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
index 217a932f06..9a2179f976 100644
--- a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
+++ b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
@@ -8,6 +8,7 @@ inherit systemd
GBMC_NCSI_DHCP_RELAY ??= "${@'' if int(d.getVar('FLASH_SIZE')) < 65536 else '1'}"
GBMC_NCSI_IF_OLD ??= ""
GBMC_NCSI_PURGE_ETC ??= ""
+GBMC_NCSI_DHCP_IMPERSONATE_HOST ??= "1"
SRC_URI += " \
${@'' if d.getVar('GBMC_NCSI_DHCP_RELAY') != '1' else 'file://-bmc-gbmcbrncsidhcp.netdev'} \
@@ -162,6 +163,11 @@ do_install:append() {
${WORKDIR}/gbmc-ncsi-smartnic-wa.sh.in >${WORKDIR}/gbmc-ncsi-smartnic-wa.sh
install -d -m0755 ${D}${bindir}
install -m0755 ${WORKDIR}/gbmc-ncsi-smartnic-wa.sh ${D}${bindir}/
+
+ if [ '${GBMC_NCSI_DHCP_IMPERSONATE_HOST}' != 1 ]; then
+ ln -sv /dev/null ${D}${systemd_system_unitdir}/dhcp6@.service
+ ln -sv /dev/null ${D}${systemd_system_unitdir}/dhcp4@.service
+ fi
}
do_rm_work:prepend() {