From 8515a680aac6075d8bba4f59cfa0cbd0ebccd3fa Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 13 Nov 2023 14:54:26 +0100 Subject: [PATCH 1/3] Remove random pause after connection failure --- .../usr/share/omr/post-tracking.d/001-post-tracking | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking index a34e5475a8..650471be71 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking @@ -898,11 +898,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then #ubus call network reload # Set a little sleep after an interface error - if [ -n "$RANDOM" ]; then - sleep `expr $RANDOM % 100` - else - sleep `awk 'BEGIN{srand();print int(rand()*20)}'` - fi +# if [ -n "$RANDOM" ]; then +# sleep `expr $RANDOM % 100` +# else +# sleep `awk 'BEGIN{srand();print int(rand()*20)}'` +# fi exit 0 fi From a5e026d6eb02f876f44d01027868caafff18c13d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 13 Nov 2023 14:55:38 +0100 Subject: [PATCH 2/3] Update netifd --- netifd/Makefile | 8 ++++---- netifd/files/lib/netifd/dhcp.script | 5 +++-- netifd/patches/001-init-pause.patch | 13 ------------- 3 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 netifd/patches/001-init-pause.patch diff --git a/netifd/Makefile b/netifd/Makefile index 808432756a..826889aca6 100644 --- a/netifd/Makefile +++ b/netifd/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2023-08-31 -PKG_SOURCE_VERSION:=1a07f1dff32b3af49e39533e33e8964b59535662 -PKG_MIRROR_HASH:=dc621dd04c3c9631002f929cf10a4620f57af8b0baf614c590bda17957fa6201 +PKG_SOURCE_DATE:=2023-11-10 +PKG_SOURCE_VERSION:=35facc8306f590a7330789ab6d5785c0d43073ef +PKG_MIRROR_HASH:=4f73591ae1873e18df235349e478f2196ca0d3123c313a04149dc9d5e2bfb403 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/netifd/files/lib/netifd/dhcp.script b/netifd/files/lib/netifd/dhcp.script index 02a95dd76c..053dd75b6b 100755 --- a/netifd/files/lib/netifd/dhcp.script +++ b/netifd/files/lib/netifd/dhcp.script @@ -19,12 +19,13 @@ setup_interface() { # TODO: apply $broadcast local ip_net - eval "$(ipcalc.sh "$ip/$mask")";ip_net="$NETWORK" + local ip_net IP PREFIX NETWORK NETMASK BROADCAST + ipcalc "$ip/$mask" && ip_net="$NETWORK" local i for i in $router; do local gw_net - eval "$(ipcalc.sh "$i/$mask")";gw_net="$NETWORK" + ipcalc "$i/$mask" && gw_net="$NETWORK" [ "$ip_net" != "$gw_net" ] && proto_add_ipv4_route "$i" 32 "" "$ip" #[ "$DEFAULTROUTE" = 0 ] || proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip" diff --git a/netifd/patches/001-init-pause.patch b/netifd/patches/001-init-pause.patch deleted file mode 100644 index 0c09aab73f..0000000000 --- a/netifd/patches/001-init-pause.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/system-linux.c 2023-09-13 10:44:22.163111635 +0200 -+++ b/system-linux.c 2023-09-13 10:44:47.562696256 +0200 -@@ -2720,7 +2720,9 @@ - system_if_dump_info(struct device *dev, struct blob_buf *b) - { - __u32 *supported, *advertising, *lp_advertising; -- bool rx_pause, tx_pause, pause_autoneg; -+ bool rx_pause = false; -+ bool tx_pause = false; -+ bool pause_autoneg = false; - struct { - struct ethtool_link_settings req; - __u32 link_mode_data[3 * 127]; From a4cd28a5d16e08bec12091407c3e50e2772d96e6 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 15 Nov 2023 16:28:39 +0100 Subject: [PATCH 3/3] Separate watchdog and modem init for z8102 --- z8102/Makefile | 4 +--- z8102/files/etc/init.d/z8102 | 3 --- z8102/files/etc/init.d/z8102-wdg | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100755 z8102/files/etc/init.d/z8102-wdg diff --git a/z8102/Makefile b/z8102/Makefile index c2b1ab0e00..4d1c7dfb49 100644 --- a/z8102/Makefile +++ b/z8102/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=z8102 PKG_VERSION:=0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Yannick Chabanois @@ -31,8 +31,6 @@ endef define Package/z8102/install $(CP) ./files/* $(1)/ - - endef $(eval $(call BuildPackage,z8102)) diff --git a/z8102/files/etc/init.d/z8102 b/z8102/files/etc/init.d/z8102 index 59b22fa035..e08ee0b2db 100755 --- a/z8102/files/etc/init.d/z8102 +++ b/z8102/files/etc/init.d/z8102 @@ -41,7 +41,4 @@ start_service() # run modem 2 i=460 echo "1" > /sys/class/gpio/gpio${i}/value - - # watchdog - /usr/lib/custom/wdg.sh & } diff --git a/z8102/files/etc/init.d/z8102-wdg b/z8102/files/etc/init.d/z8102-wdg new file mode 100755 index 0000000000..ed69d4db6a --- /dev/null +++ b/z8102/files/etc/init.d/z8102-wdg @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2023 Yannick Chabanois (Ycarus) for OpenMPTCProuter + +START=30 +USE_PROCD=1 + +log() { + logger -t "z8102-wdg" "$@" +} + +start_service() +{ + # watchdog + procd_open_instance + procd_set_param command /usr/lib/custom/wdg.sh + procd_set_param respawn + procd_close_instance +}