summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
authorYuxiao Zhang <yuxiaozhang@google.com>2024-02-23 20:56:20 +0300
committerYuxiao Zhang <yuxiaozhang@google.com>2024-02-23 20:59:08 +0300
commit5ffe5990b51c7053881ad785917533ddfa90eff5 (patch)
treed6276e407b134611e2e17f6adf66eb07ae6644cb /meta-google
parent6f6c4bd3a71bf0f49317e89c53ade6dd67b7c043 (diff)
downloadopenbmc-5ffe5990b51c7053881ad785917533ddfa90eff5.tar.xz
meta-google: gbmc-bridge: misc gbmc-br-dhcp-term fix
Fix the condition check logic, also update comments to match the code. Change-Id: Ie09b70d7079cd4ae5794c3a6cdb6eb6583f2cca2 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
Diffstat (limited to 'meta-google')
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh
index 0a821ea668..b03fba9418 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh
@@ -26,10 +26,10 @@ while true; do
ip="${addr%/*}"
ip_to_bytes ip_bytes "$ip" || continue
# Ignore ULAs and non-gBMC addresses
- (( ip_bytes[0] & 0xfc == 0xfc || ip_bytes[8] != 0xfd )) && continue
+ (( (ip_bytes[0] & 0xfc) == 0xfc || ip_bytes[8] != 0xfd )) && continue
# Only allow for the short, well known addresses <pfx>:fd01:: and not
# <pfx>:fd00:83c1:292d:feef. Otherwise, powercycle may be unavailable.
- (( ip_bytes[9] == 0 )) && continue
+ (( (ip_bytes[9] & 0x0f) == 0 )) && continue
for i in {10..15}; do
(( ip_bytes[i] != 0 )) && continue 2
done
@@ -46,7 +46,7 @@ while true; do
fi
done
-# We need to guarantee we wait at least 5 minutes from reachable in
+# We need to guarantee we wait at least 10 minutes from reachable in
# case networking just came up
wait_min=10
echo "Network is reachable, waiting $wait_min min" >&2
@@ -60,7 +60,7 @@ get_dhcp_unit_json() {
GetAll s org.freedesktop.systemd1.Unit
}
-# Follow the process and make sure it idles for at least 5 minutes before
+# Follow the process and make sure it idles for at least 10 minutes before
# shutting down. This allows for failures and retries to happen.
while true; do
json="$(get_dhcp_unit_json)" || exit