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-from-ra.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-from-ra.sh')
-rw-r--r-- | meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh index 9a5586b8a..18341fefb 100644 --- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh @@ -27,7 +27,7 @@ gbmc_br_from_ra_update() { local pfx for pfx in "${!gbmc_br_from_ra_pfxs[@]}"; do local cidr - if ! cidr="$(ipv6_pfx_to_cidr "$pfx")"; then + if ! cidr="$(ip_pfx_to_cidr "$pfx")"; then unset 'gbmc_br_from_ra_pfxs[$pfx]' continue fi @@ -38,8 +38,12 @@ gbmc_br_from_ra_update() { continue fi local addr - addr="$(ipv6_pfx_concat "$pfx" "$sfx")" + if ! addr="$(ip_pfx_concat "$pfx" "$sfx")"; then + unset 'gbmc_br_from_ra_pfxs[$pfx]' + continue + fi else + unset 'gbmc_br_from_ra_pfxs[$pfx]' continue fi local valid="${gbmc_br_from_ra_pfxs["$pfx"]}" |