meta-google: gbmc-systemd-config: Enable packet forwarding
This allows gBMCs to route packets, needed for routing packets to the
management netowrk.
Change-Id: I71f59eeb12607aa9c9d64687fb983938d5d69413
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-google/systemd/files/40-gbmc-forward.conf b/meta-google/recipes-google/systemd/files/40-gbmc-forward.conf
new file mode 100644
index 0000000..9f8d1eb
--- /dev/null
+++ b/meta-google/recipes-google/systemd/files/40-gbmc-forward.conf
@@ -0,0 +1,5 @@
+net.ipv4.ip_forward=1
+net.ipv4.conf.default.forwarding=1
+net.ipv4.conf.all.forwarding=1
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
diff --git a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb
index 011b62e..29d81f4 100644
--- a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb
+++ b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb
@@ -10,11 +10,13 @@
SRC_URI_append = " \
file://firmware-updates.target \
file://firmware-updates-pre.target \
+ file://40-gbmc-forward.conf \
"
FILES_${PN}_append = " \
${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \
${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \
+ ${libdir}/sysctl.d/40-gbmc-forward.conf \
"
FILES_${PN}_append_dev = " \
@@ -28,22 +30,23 @@
# Put coredumps in the journal to ensure they stay in ram
do_install() {
- install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
- printf "[Coredump]\nStorage=journal\n" \
- >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf
+ install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
+ printf "[Coredump]\nStorage=journal\n" \
+ >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf
- install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d
- printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
- >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
+ install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d
+ printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
+ >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
- install -d -m 0755 ${D}${systemd_system_unitdir}
- install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
- install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
+ install -d -m 0755 ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
+ install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
+
+ install -d -m0755 ${D}${libdir}/sysctl.d
+ install -m 0644 ${WORKDIR}/40-gbmc-forward.conf ${D}${libdir}/sysctl.d/
}
do_install_append_dev() {
- install -d -m 0755 ${D}${libdir}/sysctl.d
- printf "kernel.sysrq = 1\n" \
- >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
-
+ printf "kernel.sysrq = 1\n" \
+ >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
}