meta-google: gbmc-bridge: Fix misconfigured MAC
The network addresses derived from the MAC address are supposed to go in
the .network file instead of the .netdev file.
Change-Id: I9e9dc2c213414ae458392beab32334b89a897267
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-google/networking/gbmc-bridge.bb b/meta-google/recipes-google/networking/gbmc-bridge.bb
index fc7dfbf..c132bff 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge.bb
+++ b/meta-google/recipes-google/networking/gbmc-bridge.bb
@@ -7,8 +7,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
- file://-bmc-gbmcbr.netdev.in \
- file://-bmc-gbmcbr.network \
+ file://-bmc-gbmcbr.netdev \
+ file://-bmc-gbmcbr.network.in \
file://-bmc-gbmcbrdummy.netdev \
file://-bmc-gbmcbrdummy.network \
file://+-bmc-gbmcbrusb.network \
@@ -61,17 +61,16 @@
install -d -m0755 $netdir
if [ ! -z "${GBMC_BR_MAC_ADDR}" ]; then
- sed -i 's,@MAC@,Address=fe80::${@mac_to_eui64(GBMC_BR_MAC_ADDR)}/64,' \
- ${WORKDIR}/-bmc-gbmcbr.netdev.in
- addr=${GBMC_ULA_PREFIX}:${@mac_to_eui64(GBMC_BR_MAC_ADDR)}/64
- sed -i "s,@ADDR@,Address=$addr," ${WORKDIR}/-bmc-gbmcbr.netdev.in
+ local addr=
+ addr+='Address=fe80::${@mac_to_eui64(GBMC_BR_MAC_ADDR)}/64\n'
+ addr+='Address=${GBMC_ULA_PREFIX}:${@mac_to_eui64(GBMC_BR_MAC_ADDR)}/64'
+ sed -i "s,@ADDR@,$addr," ${WORKDIR}/-bmc-gbmcbr.network.in
else
- sed -i '/@MAC@/d' ${WORKDIR}/-bmc-gbmcbr.netdev.in
- sed -i '/@ADDR@/d' ${WORKDIR}/-bmc-gbmcbr.netdev.in
+ sed -i '/@ADDR@/d' ${WORKDIR}/-bmc-gbmcbr.network.in
fi
- install -m0644 ${WORKDIR}/-bmc-gbmcbr.netdev.in $netdir/-bmc-gbmcbr.netdev
- install -m0644 ${WORKDIR}/-bmc-gbmcbr.network $netdir/
+ install -m0644 ${WORKDIR}/-bmc-gbmcbr.netdev $netdir/
+ install -m0644 ${WORKDIR}/-bmc-gbmcbr.network.in $netdir/-bmc-gbmcbr.network
install -m0644 ${WORKDIR}/-bmc-gbmcbrdummy.netdev $netdir/
install -m0644 ${WORKDIR}/-bmc-gbmcbrdummy.network $netdir/
install -m0644 ${WORKDIR}/+-bmc-gbmcbrusb.network $netdir/
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev.in b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev
similarity index 79%
rename from meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev.in
rename to meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev
index a7e9133..d890ef9 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev.in
+++ b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev
@@ -1,7 +1,5 @@
[NetDev]
Name=gbmcbr
Kind=bridge
-@MAC@
-@ADDR@
[Bridge]
STP=true
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in
similarity index 93%
rename from meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network
rename to meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in
index 37aea6c..c6097bb 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network
+++ b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in
@@ -1,6 +1,7 @@
[Match]
Name=gbmcbr
[Network]
+@ADDR@
DHCP=false
IPv6AcceptRA=true
LLMNR=true