From 6fcf96d1e30710300dd84fffaba4839389d16712 Mon Sep 17 00:00:00 2001 From: nrb <freifunk@nicoboehr.de> Date: Fri, 30 Apr 2021 20:11:07 +0200 Subject: [PATCH] add patch to remove fastd delay --- ...ove-fastd-random-delay-on-inital-han.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 patches/0002-add-patch-to-remove-fastd-random-delay-on-inital-han.patch diff --git a/patches/0002-add-patch-to-remove-fastd-random-delay-on-inital-han.patch b/patches/0002-add-patch-to-remove-fastd-random-delay-on-inital-han.patch new file mode 100644 index 0000000..5f50bdd --- /dev/null +++ b/patches/0002-add-patch-to-remove-fastd-random-delay-on-inital-han.patch @@ -0,0 +1,56 @@ +From d2a2110bdf84ef5c9bac054e92948c2ea39de3ab Mon Sep 17 00:00:00 2001 +From: Nico <github@nicoboehr.de> +Date: Mon, 26 Apr 2021 14:16:03 +0000 +Subject: [PATCH] add patch to remove fastd random delay on inital handshake + +--- + ...ove-random-delay-on-inital-handshake.patch | 37 +++++++++++++++++++ + 1 file changed, 37 insertions(+) + create mode 100644 patches/packages/packages/0002-fastd-remove-random-delay-on-inital-handshake.patch + +diff --git a/patches/packages/packages/0002-fastd-remove-random-delay-on-inital-handshake.patch b/patches/packages/packages/0002-fastd-remove-random-delay-on-inital-handshake.patch +new file mode 100644 +index 00000000..e7794325 +--- /dev/null ++++ b/patches/packages/packages/0002-fastd-remove-random-delay-on-inital-handshake.patch +@@ -0,0 +1,37 @@ ++From: Nico <github@nicoboehr.de> ++Date: Mon, 26 Apr 2021 14:12:43 +0000 ++Subject: fastd: remove random delay on inital handshake ++ ++When a peer limit is defined, fastd will by default randomly delay ++the inital handshake. As our gateways delay their handshake to ++better distribute their load, this is undesireable. ++ ++diff --git a/net/fastd/patches/0100-remove-random-delay-on-inital-handshake.patch b/net/fastd/patches/0100-remove-random-delay-on-inital-handshake.patch ++new file mode 100644 ++index 0000000000000000000000000000000000000000..40ca26812bda65d8b08a1034e23d1b2335c77259 ++--- /dev/null +++++ b/net/fastd/patches/0100-remove-random-delay-on-inital-handshake.patch ++@@ -0,0 +1,23 @@ +++--- a/src/peer.c ++++++ b/src/peer.c +++@@ -322,19 +322,11 @@ static void reset_peer(fastd_peer_t *pee +++ +++ /** +++ Starts the first handshake with a newly setup peer +++- +++- If a peer group has a peer limit the handshakes will be delayed between 0 and 3 seconds +++- make the choice of peers random (it will be biased by the latency, which might or might not be +++- what a user wants) +++ */ +++ static void init_handshake(fastd_peer_t *peer) { +++- unsigned delay = 0; +++- if (has_group_config_constraints(peer->group)) +++- delay = fastd_rand(0, 3000); +++- +++ peer->state = STATE_HANDSHAKE; +++ +++- fastd_peer_schedule_handshake(peer, delay); ++++ fastd_peer_schedule_handshake(peer, 0); +++ } +++ +++ /** Handles an asynchronous DNS resolve response */ +-- +2.30.2 + -- GitLab