Merge pull request #19616 from TDT-AG/pr/20221022-mwan3
mwan3: update to version 2.11.3
This commit is contained in:
commit
59e350c144
3 changed files with 13 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mwan3
|
PKG_NAME:=mwan3
|
||||||
PKG_VERSION:=2.11.2
|
PKG_VERSION:=2.11.3
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=3
|
||||||
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
|
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
|
||||||
Aaron Goodman <aaronjg@alumni.stanford.edu>
|
Aaron Goodman <aaronjg@alumni.stanford.edu>
|
||||||
|
|
|
@ -483,7 +483,7 @@ mwan3_create_iface_route()
|
||||||
# if 'connected' was called after 'ifup'
|
# if 'connected' was called after 'ifup'
|
||||||
[ -n "$tbl" ] && [ -z "${tbl##*$route_line$'\n'*}" ] && continue
|
[ -n "$tbl" ] && [ -z "${tbl##*$route_line$'\n'*}" ] && continue
|
||||||
$IP route add table $id $route_line ||
|
$IP route add table $id $route_line ||
|
||||||
LOG warn "failed to add $route_line to table $id"
|
LOG debug "Route '$route_line' already added to table $id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -105,14 +105,22 @@ validate_wrap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnected() {
|
disconnected() {
|
||||||
|
local status="$(cat ${MWAN3TRACK_STATUS_DIR}/${INTERFACE}/STATUS)"
|
||||||
|
|
||||||
STATUS='offline'
|
STATUS='offline'
|
||||||
echo "offline" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/STATUS
|
echo "offline" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/STATUS
|
||||||
get_uptime > $MWAN3TRACK_STATUS_DIR/$INTERFACE/OFFLINE
|
get_uptime > $MWAN3TRACK_STATUS_DIR/$INTERFACE/OFFLINE
|
||||||
echo "0" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/ONLINE
|
echo "0" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/ONLINE
|
||||||
score=0
|
score=0
|
||||||
[ "$1" = 1 ] && return
|
[ "$1" = 1 ] && return
|
||||||
LOG notice "Interface $INTERFACE ($DEVICE) is offline"
|
|
||||||
env -i ACTION="disconnected" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
|
# Only execute disconnectd action if status was online or disconnecting
|
||||||
|
if [ "$status" = "online" ] || [ "$status" = "disconnecting" ]; then
|
||||||
|
LOG notice "Interface $INTERFACE ($DEVICE) is offline"
|
||||||
|
env -i ACTION="disconnected" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
|
||||||
|
else
|
||||||
|
LOG notice "Skip disconnected event for $INTERFACE ($DEVICE)"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
connected() {
|
connected() {
|
||||||
|
@ -391,8 +399,8 @@ main() {
|
||||||
|
|
||||||
if [ "${IFDOWN_EVENT}" -eq 1 ]; then
|
if [ "${IFDOWN_EVENT}" -eq 1 ]; then
|
||||||
LOG debug "Register ifdown event on interface ${INTERFACE} (${DEVICE})"
|
LOG debug "Register ifdown event on interface ${INTERFACE} (${DEVICE})"
|
||||||
disabled
|
|
||||||
disconnected
|
disconnected
|
||||||
|
disabled
|
||||||
IFDOWN_EVENT=0
|
IFDOWN_EVENT=0
|
||||||
fi
|
fi
|
||||||
if [ "${IFUP_EVENT}" -eq 1 ]; then
|
if [ "${IFUP_EVENT}" -eq 1 ]; then
|
||||||
|
|
Loading…
Reference in a new issue