Browse Source

Merge pull request #7166 from ptpt52/mwan3-fix

mwan3: rtmon: filter out linkdown routing table
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
d5bfec91cc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      net/mwan3/Makefile
  2. +2
    -2
      net/mwan3/files/lib/mwan3/mwan3.sh

+ 1
- 1
net/mwan3/Makefile View File

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


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

@ -26,13 +26,13 @@ mwan3_rtmon_ipv4()
local idx=0
local ret=1
mkdir -p /tmp/mwan3rtmon
($IP4 route list table main | grep -v ^default | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.main
($IP4 route list table main | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.main
while uci get mwan3.@interface[$idx] >/dev/null 2>&1 ; do
idx=$((idx+1))
tid=$idx
[ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv4" ] && {
if $IP4 route list table $tid | grep -q ^default; then
($IP4 route list table $tid | grep -v ^default | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.$tid
($IP4 route list table $tid | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.$tid
cat /tmp/mwan3rtmon/ipv4.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv4.main | while read line; do
$IP4 route del table $tid $line
done


Loading…
Cancel
Save