fix: parsing other tableentries than unicast; bump version
Signed-off-by: Blackyfff <freifunk@freifunk-herpf.de>
This commit is contained in:
parent
e171cc5a3c
commit
033a650f4b
|
@ -8,7 +8,7 @@
|
||||||
# exit script when command fails
|
# exit script when command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export DNSSCRIPT_VERSION="0.8.4"
|
export DNSSCRIPT_VERSION="0.9.0"
|
||||||
|
|
||||||
. /etc/ffdns/community.conf
|
. /etc/ffdns/community.conf
|
||||||
. /etc/ffdns/local.conf
|
. /etc/ffdns/local.conf
|
||||||
|
|
|
@ -23,17 +23,17 @@ else
|
||||||
Installed4Routes=""
|
Installed4Routes=""
|
||||||
Installed6Routes=""
|
Installed6Routes=""
|
||||||
for Table in $Tables; do
|
for Table in $Tables; do
|
||||||
Installed4Routes="$(echo "$Installed4Routes" && ip -4 ro sh ta "$Table")"
|
Installed4Routes="$(echo "$Installed4Routes" && ip -d -4 ro sh ta "$Table")"
|
||||||
Installed6Routes="$(echo "$Installed6Routes" && ip -6 ro sh ta "$Table")"
|
Installed6Routes="$(echo "$Installed6Routes" && ip -d -6 ro sh ta "$Table")"
|
||||||
done
|
done
|
||||||
PublicSubs="$(echo "$Installed6Routes" | \
|
PublicSubs="$(echo "$Installed6Routes" | \
|
||||||
sed -e '/^default from/!d;s/.* from \(\S\+\).*/\1/g')"
|
sed -e '/^unicast default from/!d;s/.* from \(\S\+\).*/\1/g')"
|
||||||
Privatev4Prefix="\(192\.168\.\|172\.\(1[6-9]\|2[0-9]\|3[01]\)\.\|10\.\)"
|
Privatev4Prefix="\(192\.168\.\|172\.\(1[6-9]\|2[0-9]\|3[01]\)\.\|10\.\)"
|
||||||
Privatev6Prefix="\([fF][cCdD][0-9a-fA-F]\{2\}:\)"
|
Privatev6Prefix="\([fF][cCdD][0-9a-fA-F]\{2\}:\)"
|
||||||
Publicv4Singles="$(echo "$Installed4Routes" | \
|
Publicv4Singles="$(echo "$Installed4Routes" | \
|
||||||
sed -e 's/^\(\S\+\)\s.*/\t\1;/g;/^\t'"$Privatev4Prefix"'\|^\t\(unreachable\|default\|0\.\)\|^$/d')"
|
sed -e 's/^\S\+\s\+\(\S\+\)\s.*/\t\1;/g;/^\t'"$Privatev4Prefix"'\|^\t\(unreachable\|default\|0\.\)\|^$/d')"
|
||||||
Publicv6Singles="$(echo "$Installed6Routes" | \
|
Publicv6Singles="$(echo "$Installed6Routes" | \
|
||||||
sed -e 's/^\(\S\+\)\s.*/\1/g;/^'"$Privatev6Prefix"'\|^\(unreachable\|default\|::\|64:ff9b::\)\|^$/d')"
|
sed -e 's/^\S\+\s\+\(\S\+\)\s.*/\1/g;/^'"$Privatev6Prefix"'\|^\(unreachable\|default\|::\|64:ff9b::\)\|^$/d')"
|
||||||
|
|
||||||
# the following code is not well optimized yet and may take a bit to process
|
# the following code is not well optimized yet and may take a bit to process
|
||||||
# therefore it is not recommended to activate it on hardware-routers
|
# therefore it is not recommended to activate it on hardware-routers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user