From 51def646105d0e53c94bafe9514039e85bb76a8b Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sun, 13 Feb 2022 23:11:59 -0800 Subject: meta-google: gbmc-ncsi-config: Add stateless IP We want to respond to neighbor solicits over NCSI for all public IPs on the bridge. Change-Id: I9179ca6cb82d956a6b1db82c075e803248d7248d Signed-off-by: William A. Kennington III --- .../recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta-google') diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in index 9d9f7899e5..96037ea450 100644 --- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in @@ -37,6 +37,10 @@ gbmc_ncsi_br_deprecated_ips_update() { local pfx="$(ip_bytes_to_str pfx_bytes)" (( pfx_bytes[9] &= 0xf0 )) local stateless_pfx="$(ip_bytes_to_str pfx_bytes)" + local gbmcbr_mac="$(ip link show gbmcbr | tail -n 1 | awk '{print $2}')" + local gbmcbr_eui48="$(mac_to_eui48 "$gbmcbr_mac")" + local stateless_ip="$(ip_pfx_concat "$stateless_pfx/80" "$gbmcbr_eui48")" + stateless_ip="${stateless_ip%/*}" pfx_bytes[8]=0 pfx_bytes[9]=0 local host_pfx="$(ip_bytes_to_str pfx_bytes)" @@ -48,6 +52,9 @@ PreferredLifetime=0 Address=$stateless_pfx/128 PreferredLifetime=0 [Address] +Address=$stateless_ip/128 +PreferredLifetime=0 +[Address] Address=$host_pfx/128 PreferredLifetime=0 EOF -- cgit v1.2.3