diff options
author | William A. Kennington III <wak@google.com> | 2021-11-05 14:15:36 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2021-11-06 02:40:43 +0300 |
commit | 58ac4343a47e69e6c23f7f3128b6da1b9d922a91 (patch) | |
tree | 0bae6d81e7c88eee8217d04b44dece8827811a8c /meta-google/recipes-google/networking | |
parent | cefbd1cf61ec037f62b7f5cfe93c727ed234226a (diff) | |
download | openbmc-58ac4343a47e69e6c23f7f3128b6da1b9d922a91.tar.xz |
meta-google: gbmc-bridge: Defer address reconfiguration
Reconfiguring network interfaces immediately after detecting changes may
not allow them enough time to settle. Without waiting, we might
pre-emptively assume the configuration is changing even though networkd
is just flushing and resetting the interface with the same config.
Change-Id: I6a6858578d0499305fe2a3d3592dc73533bb02f1
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google/recipes-google/networking')
-rw-r--r-- | meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh | 10 |
1 files changed, 6 insertions, 4 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 18341fefb6..a9bfd74afb 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 @@ -67,26 +67,28 @@ gbmc_br_from_ra_update() { gbmc_br_from_ra_hook() { if [ "$change" = 'init' ]; then gbmc_br_from_ra_init=1 + gbmc_ip_monitor_defer + elif [ "$change" = 'defer' ]; then gbmc_br_from_ra_update elif [[ "$change" == 'route' && "$route" != *' via '* ]] && [[ "$route" =~ ^(.* dev gbmcbr proto ra .*)( +expires +([^ ]+)sec).*$ ]]; then pfx="${route%% *}" if [ "$action" = 'add' ]; then gbmc_br_from_ra_pfxs["$pfx"]="${BASH_REMATCH[3]}" - gbmc_br_from_ra_update + gbmc_ip_monitor_defer elif [ "$action" = 'del' ]; then gbmc_br_from_ra_pfxs["$pfx"]=0 - gbmc_br_from_ra_update + gbmc_ip_monitor_defer fi elif [ "$change" = 'link' -a "$intf" = 'gbmcbr' ]; then rdisc6 -m gbmcbr -r 1 -w 100 >/dev/null 2>&1 if [ "$action" = 'add' -a "$mac" != "$gbmc_br_from_ra_mac" ]; then gbmc_br_from_ra_mac="$mac" - gbmc_br_from_ra_update + gbmc_ip_monitor_defer fi if [ "$action" = 'del' -a "$mac" = "$gbmc_br_from_ra_mac" ]; then gbmc_br_from_ra_mac= - gbmc_br_from_ra_update + gbmc_ip_monitor_defer fi fi } |