2018-08-23 18:33:06 -06:00
|
|
|
Index: openwrt/package/network/utils/iperf3/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- openwrt.orig/package/network/utils/iperf3/Makefile
|
|
|
|
+++ openwrt/package/network/utils/iperf3/Makefile
|
2018-08-04 08:38:58 -06:00
|
|
|
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
2018-06-30 17:37:45 -06:00
|
|
|
|
|
|
|
PKG_NAME:=iperf
|
2020-01-22 18:37:27 -07:00
|
|
|
PKG_VERSION:=3.7
|
2018-06-30 17:37:45 -06:00
|
|
|
-PKG_RELEASE:=1
|
|
|
|
+PKG_RELEASE:=1AREDN
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2020-01-22 18:37:27 -07:00
|
|
|
PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf
|
2018-08-04 08:38:58 -06:00
|
|
|
@@ -72,6 +72,18 @@ endef
|
|
|
|
define Package/iperf3/install
|
2018-06-30 17:37:45 -06:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2018-08-04 08:38:58 -06:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
|
2018-06-30 17:37:45 -06:00
|
|
|
+ $(INSTALL_DIR) $(1)/etc/local/mesh-firewall
|
2018-08-04 08:38:58 -06:00
|
|
|
+ $(INSTALL_BIN) ./files/iperf.firewall $(1)/etc/local/mesh-firewall/20-iperf3
|
2018-06-30 17:37:45 -06:00
|
|
|
+endef
|
|
|
|
+
|
|
|
|
+define Package/iperf/postinst
|
|
|
|
+#!/bin/sh
|
|
|
|
+# check if we are on real system
|
|
|
|
+if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
|
|
+ echo "Restarting Firewall"
|
|
|
|
+ /etc/init.d/firewall restart
|
|
|
|
+fi
|
|
|
|
+exit 0
|
|
|
|
endef
|
|
|
|
|
2018-08-04 08:38:58 -06:00
|
|
|
define Package/iperf3-ssl/install
|
2018-08-23 18:33:06 -06:00
|
|
|
Index: openwrt/package/network/utils/iperf3/files/iperf.firewall
|
|
|
|
===================================================================
|
2018-06-30 17:37:45 -06:00
|
|
|
--- /dev/null
|
2018-08-23 18:33:06 -06:00
|
|
|
+++ openwrt/package/network/utils/iperf3/files/iperf.firewall
|
2018-08-04 08:38:58 -06:00
|
|
|
@@ -0,0 +1,9 @@
|
2018-06-30 17:37:45 -06:00
|
|
|
+#!/bin/sh
|
2018-08-04 08:38:58 -06:00
|
|
|
+iptables -I zone_wifi_input -p udp -m udp --dport 5201 -j ACCEPT
|
|
|
|
+iptables -I zone_wifi_input -p tcp -m tcp --dport 5201 -j ACCEPT
|
|
|
|
+iptables -I zone_dtdlink_input -p udp -m udp --dport 5201 -j ACCEPT
|
|
|
|
+iptables -I zone_dtdlink_input -p tcp -m tcp --dport 5201 -j ACCEPT
|
2018-06-30 17:37:45 -06:00
|
|
|
+if [ "$MESHFW_TUNNELS_ENABLED" == "1" ]; then
|
2018-08-04 08:38:58 -06:00
|
|
|
+ iptables -I zone_vpn_input -p udp -m udp --dport 5201 -j ACCEPT
|
|
|
|
+ iptables -I zone_vpn_input -p tcp -m tcp --dport 5201 -j ACCEPT
|
2018-06-30 17:37:45 -06:00
|
|
|
+fi
|