Browse Source

Merge pull request #5185 from kubco2/mwan3-improve-logs

mwan3: Improve logs when member metric is too big
lilik-openwrt-22.03
Hannu Nyman 7 years ago
committed by GitHub
parent
commit
9863f23b9f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions
  1. +1
    -1
      net/mwan3/Makefile
  2. +4
    -2
      net/mwan3/files/lib/mwan3/mwan3.sh

+ 1
- 1
net/mwan3/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3 PKG_NAME:=mwan3
PKG_VERSION:=2.6.8
PKG_VERSION:=2.6.9
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de> PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2 PKG_LICENSE:=GPLv2


+ 4
- 2
net/mwan3/files/lib/mwan3/mwan3.sh View File

@ -10,6 +10,7 @@ CONNTRACK_FILE="/proc/net/nf_conntrack"
MWAN3_STATUS_DIR="/var/run/mwan3" MWAN3_STATUS_DIR="/var/run/mwan3"
MWAN3TRACK_STATUS_DIR="/var/run/mwan3track" MWAN3TRACK_STATUS_DIR="/var/run/mwan3track"
DEFAULT_LOWEST_METRIC=256
[ -d $MWAN3_STATUS_DIR ] || mkdir -p $MWAN3_STATUS_DIR/iface_state [ -d $MWAN3_STATUS_DIR ] || mkdir -p $MWAN3_STATUS_DIR/iface_state
# mwan3's MARKing mask (at least 3 bits should be set) # mwan3's MARKing mask (at least 3 bits should be set)
@ -480,6 +481,7 @@ mwan3_set_policy()
config_get weight $1 weight 1 config_get weight $1 weight 1
[ -n "$iface" ] || return 0 [ -n "$iface" ] || return 0
[ "$metric" -gt $DEFAULT_LOWEST_METRIC ] && $LOG warn "Member interface $iface has >$DEFAULT_LOWEST_METRIC metric. Not appending to policy" && return 0
mwan3_get_iface_id id $iface mwan3_get_iface_id id $iface
@ -587,10 +589,10 @@ mwan3_create_policies_iptables()
esac esac
done done
lowest_metric_v4=256
lowest_metric_v4=$DEFAULT_LOWEST_METRIC
total_weight_v4=0 total_weight_v4=0
lowest_metric_v6=256
lowest_metric_v6=$DEFAULT_LOWEST_METRIC
total_weight_v6=0 total_weight_v6=0
config_list_foreach $1 use_member mwan3_set_policy config_list_foreach $1 use_member mwan3_set_policy


Loading…
Cancel
Save