From 085dbb64fe8b1b8ca182ad40cd2ccf3ffda5c9fd Mon Sep 17 00:00:00 2001 From: Robert Langhammer Date: Sat, 4 Dec 2021 11:45:59 +0100 Subject: [PATCH] fff-fastd: Add batman hardif hop_penalty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Openwrt v21.02.0 contains a new Batman Adv that now offers hop_penalty per hardif. We can use this to prefer one tunnel for outgoing traffic if there are several VPNs. Eg. fastd and vxlan. This Patch sets the hop_penalty for the fastd tunnel to 30. Signed-off-by: Robert Langhammer Acked-by: Fabian Bläse --- src/packages/fff/fff-fastd/Makefile | 2 +- src/packages/fff/fff-fastd/files/etc/uci-defaults/55_fff-fastd | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/packages/fff/fff-fastd/Makefile b/src/packages/fff/fff-fastd/Makefile index 341e9e51..19aaf037 100644 --- a/src/packages/fff/fff-fastd/Makefile +++ b/src/packages/fff/fff-fastd/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-fastd -PKG_RELEASE:=4 +PKG_RELEASE:=5 include $(INCLUDE_DIR)/package.mk diff --git a/src/packages/fff/fff-fastd/files/etc/uci-defaults/55_fff-fastd b/src/packages/fff/fff-fastd/files/etc/uci-defaults/55_fff-fastd index dc2e3459..c30d2187 100644 --- a/src/packages/fff/fff-fastd/files/etc/uci-defaults/55_fff-fastd +++ b/src/packages/fff/fff-fastd/files/etc/uci-defaults/55_fff-fastd @@ -29,6 +29,7 @@ ln -s /tmp/fastd_fff_peers /etc/fastd/fff/peers echo "#!/bin/sh" > /etc/fastd/fff/up.sh echo "ip link set up dev fffVPN" >> /etc/fastd/fff/up.sh echo "batctl if add fffVPN" >> /etc/fastd/fff/up.sh +echo "batctl hardif fffVPN hop_penalty 30" >> /etc/fastd/fff/up.sh chmod +x /etc/fastd/fff/up.sh exit 0