Skip to content

Commit d1e5b4f

Browse files
committed
Fix fleth auto concurrency issue and improve IPv6 mode configuration
1 parent 2b0b967 commit d1e5b4f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

root/usr/sbin/fleth

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ EOF
369369
}
370370

371371
if [ "$1" = "auto" ]; then
372+
if [ "$(pgrep -f "fleth auto" | wc -l)" -ge 3 ]; then
373+
exit 0
374+
fi
372375
logger -t fleth "is running $h_ENABLED"
373376
if [ "$h_ENABLED" == "1" ]; then
374377
get_uplink_interface_ipv6 > /dev/null
@@ -429,6 +432,7 @@ elif [ "$1" = "setup_ipv6_slaac" ]; then
429432
# Configure uplink interface settings
430433
uci batch <<EOF
431434
set network.${h_UPLINK_INTERFACE}.reqaddress='try'
435+
set network.${h_UPLINK_INTERFACE}.extendprefix='1'
432436
del network.${h_UPLINK_INTERFACE}.reqprefix
433437
del network.${h_UPLINK_INTERFACE}.ip6assign
434438
set dhcp.${h_UPLINK_INTERFACE}=dhcp
@@ -474,6 +478,7 @@ elif [ "$1" = "setup_ipv6_pd" ]; then
474478
set network.${h_UPLINK_INTERFACE}.reqprefix='auto'
475479
set network.${h_UPLINK_INTERFACE}.reqaddress='try'
476480
set network.${h_UPLINK_INTERFACE}.ip6assign='64'
481+
del network.${h_UPLINK_INTERFACE}.extendprefix
477482
set dhcp.${h_UPLINK_INTERFACE}=dhcp
478483
set dhcp.${h_UPLINK_INTERFACE}.interface='${h_UPLINK_INTERFACE}'
479484
set dhcp.${h_UPLINK_INTERFACE}.master='1'

0 commit comments

Comments
 (0)