Skip to content

Commit

Permalink
S52batmand: use PREFERED_GATEWAY if configured
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Jan 4, 2024
1 parent 7a7c076 commit 067fa10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 3 additions & 6 deletions .ci/build_uci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@ test ! -d build && mkdir build ; cd build
git clone https://git.openwrt.org/project/libubox.git
cd libubox || exit 1
git checkout ea56013409d5823001b47a9bba6f74055a6d76a5
cd ..
mkdir BUILD-libubox
cd .. ; mkdir BUILD-libubox

# UCI
git clone https://git.openwrt.org/project/uci.git
cd uci || exit 1
git checkout f84f49f00fb70364f58b4cce72f1796a7190d370
cd ..
mkdir BUILD-uci
cd .. ; mkdir BUILD-uci

# UBOX
git clone https://git.openwrt.org/project/ubox.git
# needs to be include udebug for master branch
cd ubox || exit 1
git checkout 4c7b720b9c63b826fb9404e454ae54f2ef5649d5
cd ..
mkdir BUILD-ubox
cd .. ; mkdir BUILD-ubox

# UBUS
git clone https://git.openwrt.org/project/ubus.git
Expand Down
8 changes: 4 additions & 4 deletions salt/freifunk/base/bmxd/etc/init.d/S52batmand
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ eval "$(ddmesh-ipcalc.sh -n "$(uci -qX get ffdd.sys.ddmesh_node)")"
MESH_NETWORK_ID="$(uci -qX get ffdd.sys.network_id)"
test -z "${MESH_NETWORK_ID}" && MESH_NETWORK_ID="0"

# check if community is a community server that forwards any traffic from one
# check if community is a community server that forwards any traffic from one
# sub-community to any other (via bgb protocoll or similar)
COMMUNITY_SERVER="$(uci -qX get ffdd.sys.community_server)"
test -z "${COMMUNITY_SERVER}" && COMMUNITY_SERVER=0
Expand Down Expand Up @@ -67,7 +67,7 @@ if [ "$1" = "start" ]; then
ip addr add "$_ddmesh_ip"/"$_ddmesh_netpre" broadcast "$_ddmesh_broadcast" dev "$PRIMARY_IF"
ip link set dev "$PRIMARY_IF" up

# add ipip tunnel interface that can be used by clients to route internet traffic.
# add ipip tunnel interface that can be used by clients to route internet traffic.
# - improves upload speed and download speed (ack) (bmxd normally creates a tunnel where data
# are put in to forward it to gateway. this copies data between kernel/user buffer two times
# and increase the bmxd processor load extremly
Expand Down Expand Up @@ -105,9 +105,9 @@ OPTS="${OPTS} --network $_ddmesh_meshnet --netid $MESH_NETWORK_ID --community_ga
# 10s OGM interval, purge timeout 35 -> 3 OGM
# 5s OGM interval, purge timeout 35 -> 7 OGM
OPTS="${OPTS} --hop_penalty 5 --lateness_penalty 10 --wireless_ogm_clone 100 --udp_data_size 512 --ogm_interval 5000 --purge_timeout 35"
OPTS="${OPTS} --path_hysteresis 3"
OPTS="${OPTS} --path_hysteresis 3 ${PREFERED_GATEWAY}"
DAEMON_OPTS="${OPTS} $_IF"

test -x "$DAEMON_PATH"/"$DAEMON" || exit 0

case "$ARG1" in
Expand Down

0 comments on commit 067fa10

Please sign in to comment.