diff options
author | William A. Kennington III <wak@google.com> | 2021-05-10 13:14:42 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2021-05-11 23:35:55 +0300 |
commit | 6ca7033951727549245d10d599890a49c2ed79f6 (patch) | |
tree | e65400280a0941d12c72ed4a4c7d9fadbf3f1817 /meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh | |
parent | 80776788b1946fbbe0748a54b18cb1b28c03a8ad (diff) | |
download | openbmc-6ca7033951727549245d10d599890a49c2ed79f6.tar.xz |
meta-google: network-sh: Convert to IP bytes
Now that we can convert to and from IP bytes, we should use them
everywhere to ensure values are parsed correctly.
Change-Id: I995091d1eff670db6678b4a2f4a64113e93308f7
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh')
-rw-r--r-- | meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh index ac273a395..69897100e 100644 --- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh @@ -27,10 +27,11 @@ gbmc_br_ula_update() { local addr= contents='[Network]'$'\n' if [ -n "$gbmc_br_ula_mac" ]; then - local eui64 - eui64="$(mac_to_eui64 "$mac")" || return - addr="fdb5:0481:10ce:0:$eui64/64" - contents+="Address=$addr"$'\n' + local sfx + if sfx="$(mac_to_eui64 "$gbmc_br_ula_mac")" && + addr="$(ip_pfx_concat "fdb5:0481:10ce::/64" "$sfx")"; then + contents+="Address=$addr"$'\n' + fi fi local netfile |