mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
bsbf-resources: update to GIT HEAD of 2026-05-16
Update bsbf-resources to the GIT HEAD of 2026-05-16.
- files/etc/uci-defaults/99-bsbf-bonding:
- Do not ever exit non-zero. It prevents the script from being deleted
after it's run.
- Fix creating a new wan zone.
- Do not disable using DNS servers advertised by the ISP. We can now do
this as we transparently proxy all DNS traffic to Xray which resolves
queries.
- files/usr/sbin/bsbf-bonding:
- Attempting to source a file that doesn't exist breaks the rest of the
script. Therefore, only source /etc/bsbf/bsbf-bonding.conf if it
exists. Then, print to stderr if the configuration is improper.
Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com>
This commit is contained in:
@@ -11,9 +11,9 @@ PKG_MAINTAINER:=Chester A. Unal <chester.a.unal@arinc9.com>
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/bondingshouldbefree/bsbf-resources.git
|
PKG_SOURCE_URL:=https://github.com/bondingshouldbefree/bsbf-resources.git
|
||||||
PKG_SOURCE_DATE:=2026-05-14
|
PKG_SOURCE_DATE:=2026-05-16
|
||||||
PKG_SOURCE_VERSION:=3eece0a10ff73ca94bdedeacd063869c267aa3ca
|
PKG_SOURCE_VERSION:=733d3159e4c769a4fdd9e42ced53e346e2582beb
|
||||||
PKG_MIRROR_HASH:=d3e1094f27ba49a1f99045fb27724aaea51813260eaafebe255780336da57931
|
PKG_MIRROR_HASH:=95c51a6b430f7b68e0b17d581fda7ac524d5e21e66375fdd4d4f830c61b2089a
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ fi
|
|||||||
# interfaces other than the one used for lan, if there are any.
|
# interfaces other than the one used for lan, if there are any.
|
||||||
final_wan_interfaces="$wan_network_interface $(echo $lan_interfaces | tr ' ' '\n' | grep -v "^$lan_network_interface$")"
|
final_wan_interfaces="$wan_network_interface $(echo $lan_interfaces | tr ' ' '\n' | grep -v "^$lan_network_interface$")"
|
||||||
|
|
||||||
# If there are no suitable wan interfaces, exit with code 1.
|
# Exit if there are no suitable wan interfaces.
|
||||||
[ -z "$(echo "$final_wan_interfaces" | tr ' ' '\n')" ] && exit 1
|
[ -z "$(echo "$final_wan_interfaces" | tr ' ' '\n')" ] && exit
|
||||||
|
|
||||||
# Delete existing wan and wan6 networks.
|
# Delete existing wan and wan6 networks.
|
||||||
uci delete network.wan
|
uci delete network.wan
|
||||||
@@ -56,12 +56,12 @@ if [ -n "$fw_section" ]; then
|
|||||||
# If firewall section for wan doesn't exist, create one.
|
# If firewall section for wan doesn't exist, create one.
|
||||||
else
|
else
|
||||||
fw_section=$(uci add firewall zone)
|
fw_section=$(uci add firewall zone)
|
||||||
uci set firewall.@rule[-1].name='wan'
|
uci set firewall.@zone[-1].name='wan'
|
||||||
uci set firewall.@rule[-1].input='REJECT'
|
uci set firewall.@zone[-1].input='REJECT'
|
||||||
uci set firewall.@rule[-1].output='ACCEPT'
|
uci set firewall.@zone[-1].output='ACCEPT'
|
||||||
uci set firewall.@rule[-1].forward='DROP'
|
uci set firewall.@zone[-1].forward='DROP'
|
||||||
uci set firewall.@rule[-1].masq='1'
|
uci set firewall.@zone[-1].masq='1'
|
||||||
uci set firewall.@rule[-1].mtu_fix='1'
|
uci set firewall.@zone[-1].mtu_fix='1'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
index=1
|
index=1
|
||||||
@@ -73,7 +73,6 @@ for dev in $final_wan_interfaces; do
|
|||||||
uci set network.wan$index=interface
|
uci set network.wan$index=interface
|
||||||
uci set network.wan$index.device="$dev"
|
uci set network.wan$index.device="$dev"
|
||||||
uci set network.wan$index.proto='dhcp'
|
uci set network.wan$index.proto='dhcp'
|
||||||
uci set network.wan$index.peerdns='0'
|
|
||||||
uci set network.wan$index.metric="$index"
|
uci set network.wan$index.metric="$index"
|
||||||
|
|
||||||
# Add every wan network entry to firewall wan zone.
|
# Add every wan network entry to firewall wan zone.
|
||||||
@@ -82,14 +81,6 @@ for dev in $final_wan_interfaces; do
|
|||||||
index=$((index + 1))
|
index=$((index + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
# Configure dnsmasq.
|
|
||||||
# As we don't want to use the DNS servers advertised by WANs, set up DNS
|
|
||||||
# forwarding. Use 8.8.8.8 and 8.8.4.4.
|
|
||||||
uci -q del_list dhcp.@dnsmasq[0].server='8.8.8.8'
|
|
||||||
uci -q del_list dhcp.@dnsmasq[0].server='8.8.4.4'
|
|
||||||
uci add_list dhcp.@dnsmasq[0].server='8.8.8.8'
|
|
||||||
uci add_list dhcp.@dnsmasq[0].server='8.8.4.4'
|
|
||||||
|
|
||||||
# Configure xray.
|
# Configure xray.
|
||||||
uci set xray.enabled.enabled='1'
|
uci set xray.enabled.enabled='1'
|
||||||
|
|
||||||
@@ -113,5 +104,5 @@ uci set network.@route[-1].table='100'
|
|||||||
# Commit changes.
|
# Commit changes.
|
||||||
uci commit
|
uci commit
|
||||||
|
|
||||||
# Enable bonding.
|
# Enable bonding and ignore the non-zero exit code of bsbf-bonding.
|
||||||
bsbf-bonding --enable
|
bsbf-bonding --enable || true
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ case "$1" in
|
|||||||
--enable)
|
--enable)
|
||||||
# Source /etc/bsbf/bsbf-bonding.conf. Exit if server_ipv4, server_port,
|
# Source /etc/bsbf/bsbf-bonding.conf. Exit if server_ipv4, server_port,
|
||||||
# or uuid is empty.
|
# or uuid is empty.
|
||||||
. /etc/bsbf/bsbf-bonding.conf
|
[ -f /etc/bsbf/bsbf-bonding.conf ] && . /etc/bsbf/bsbf-bonding.conf
|
||||||
if [ -z "$server_ipv4" ] || [ -z "$server_port" ] || [ -z "$uuid" ]; then
|
if [ -z "$server_ipv4" ] || [ -z "$server_port" ] || [ -z "$uuid" ]; then
|
||||||
echo "server_ipv4, server_port, and uuid on /etc/bsbf/bsbf-bonding.conf must not be empty."
|
echo "server_ipv4, server_port, and uuid on /etc/bsbf/bsbf-bonding.conf must not be empty. Populate them and then run 'bsbf-bonding --enable'." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user