summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2023-03-01 03:11:43 +0300
committerWilliam A. Kennington III <wak@google.com>2023-03-01 03:12:32 +0300
commit618c109c3300f48adbb9b120142842e16225535b (patch)
tree21e89c47beb91fcc180c51b7a3ba981388718913 /meta-google
parent4d777a62f64fce6d769477eb34b7a7faa2b15a65 (diff)
downloadopenbmc-618c109c3300f48adbb9b120142842e16225535b.tar.xz
meta-google: gbmc-bridge: Use saved address as ping source
We don't want to use any implicitly generated SLAAC addresses as this will allow our machine to think it is reachable even though megapede will not be able to reach it via the DHCP derived address. Change-Id: Iba73d8a96d8a6dfcd7988bf0cca44a5b14558290 Signed-off-by: William A. Kennington III <wak@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, 7 insertions, 1 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 4cc0f6ee4e..c3b5a33659 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
@@ -13,9 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# If we don't have a saved IP, we keep running indefinitely
+if ! srcip="$(cat /var/google/gbmc-br-ip 2>/dev/null)"; then
+ echo 'Missing saved gbmc-br IP' >&2
+ exit 0
+fi
+
# Wait until a well known service is network available
echo "Waiting for network reachability" >&2
-while ! ping -c 1 -W 1 2001:4860:4860::8888 >/dev/null 2>&1; do
+while ! ping -I "$srcip" -c 1 -W 1 2001:4860:4860::8888 >/dev/null 2>&1; do
sleep 1
done