summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google/networking
diff options
context:
space:
mode:
authorWilly Tu <wltu@google.com>2021-02-09 23:41:44 +0300
committerWilliam A. Kennington III <wak@google.com>2021-02-12 23:58:02 +0300
commit1fe95d5c751eb29fb5a522a6b888c400a3cf37c2 (patch)
treef0ec3af80984f8327775090d4a6bfc548420c285 /meta-google/recipes-google/networking
parentbb26a1029e2021db68a312921107c4346cd9bd4f (diff)
downloadopenbmc-1fe95d5c751eb29fb5a522a6b888c400a3cf37c2.tar.xz
meta-google: recipes-google: networking: iperf3: Import from gBMC
Initial recipes-google/networking iperf3 code from gBMC. Google-Bug-Id: 179617830 Upstream: 8ac594bdf054082ca6dbe35c4345759fe4c31669 Signed-off-by: Willy Tu <wltu@google.com> Change-Id: I686a3debd6b6647ce215253c555f208d2a5e46f2
Diffstat (limited to 'meta-google/recipes-google/networking')
-rw-r--r--meta-google/recipes-google/networking/files/iperf3.service21
-rw-r--r--meta-google/recipes-google/networking/gbmc-iperf3.bb18
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-google/recipes-google/networking/files/iperf3.service b/meta-google/recipes-google/networking/files/iperf3.service
new file mode 100644
index 000000000..f2d9586e1
--- /dev/null
+++ b/meta-google/recipes-google/networking/files/iperf3.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=IPERF3 Server
+
+[Service]
+ExecStart=/usr/bin/iperf3 -s
+#Hardening
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+MountFlags=private
+NoNewPrivileges=true
+PrivateDevices=true
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+MemoryDenyWriteExecute=true
+DynamicUser=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-google/recipes-google/networking/gbmc-iperf3.bb b/meta-google/recipes-google/networking/gbmc-iperf3.bb
new file mode 100644
index 000000000..f1a88b459
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-iperf3.bb
@@ -0,0 +1,18 @@
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+
+RDEPENDS_${PN} += "iperf3"
+
+SRC_URI += "file://iperf3.service"
+
+SYSTEMD_SERVICE_${PN} += "iperf3.service"
+
+do_install() {
+ # Install service definitions
+ install -d -m 0755 ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/iperf3.service ${D}${systemd_system_unitdir}
+}