blob: 66d7a7d2dab0e7e3df4de3392619458b669f259b [file] [log] [blame]
William A. Kennington IIIbca10712024-08-07 00:49:29 -07001#!/bin/bash
2# Copyright 2024 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# shellcheck source=meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh
17source /usr/share/gbmc-br-lib.sh || exit
18
William A. Kennington III8f126602024-09-04 15:14:14 -070019update_rtr() {
20 true
21}
22
William A. Kennington IIIbca10712024-08-07 00:49:29 -070023update_fqdn() {
William A. Kennington III8f126602024-09-04 15:14:14 -070024 (( IP_OFFSET == 0 )) && return
25 default_update_fqdn "$@"
William A. Kennington IIIbca10712024-08-07 00:49:29 -070026}
27
28update_pfx() {
William A. Kennington III8f126602024-09-04 15:14:14 -070029 local pfx="$1"
30 (( IP_OFFSET == 0 )) && return
31 gbmc_br_set_ip "$pfx" || true
32 echo "IP $pfx set on $RA_IF" >&2
William A. Kennington IIIbca10712024-08-07 00:49:29 -070033}
34
35RA_IF=gbmcbr
36IP_OFFSET=@IP_OFFSET@
William A. Kennington III8f126602024-09-04 15:14:14 -070037# Use the lowest priority, except for kernel RA discovered routes.
38# We want closer NICs to provide a default route if existing.
39ROUTE_METRIC=1000
William A. Kennington IIIbca10712024-08-07 00:49:29 -070040
William A. Kennington III8f126602024-09-04 15:14:14 -070041# shellcheck source=meta-google/recipes-google/networking/gbmc-net-common/gbmc-ra.sh
42source /usr/share/gbmc-ra.sh || exit