Commit 6fe79939 authored by Ondřej Zajíček's avatar Ondřej Zajíček

Netlab: Do not strip link-local addresses

As they are now stable.
parent 5f5460ab
......@@ -9,8 +9,7 @@ netns-bin/netns_run
netlab/bird6/bird*
netlab/bird4/bird*
netlab-int/cf-ospf/__pycache__
netlab-int/tests/__pycache__
__pycache__
netlab-int/.NOTES.md
......
......@@ -4,5 +4,4 @@
cd $1 && ./birdc -l show route $2 $3 \
| strip_version \
| strip_timestamp \
| strip_addresses \
| ../tests/sort_show_route
......@@ -2,7 +2,6 @@
. tests/strip_output
ip -f $1 route show $2 \
| strip_addresses \
| strip_interfaces_via \
| strip_nexthop_pref \
| strip_trailing_space \
| strip_link_local_routes
......@@ -13,16 +13,6 @@ strip_addresses() {
sed -E "s/([^[:alnum:]]fe80::)[[:alnum:]:]*( [[:alnum:]]*)/\1<removed>\2/"
}
strip_interfaces_on() {
# remove the name of interfaces for link-local nexthops, after 'on'
sed -E "s/(fe80::<removed> on) [[:alnum:]]* weight/\1 <removed> weight/"
}
strip_interfaces_via() {
# remove the name of interfaces for link-local nexthops, after 'via'
sed -E "s/(nexthop via fe80::.* dev) [[:alnum:]]*/\1 <removed>/"
}
strip_nexthop_pref() {
# remove 'pref' value for ECMP nexthops reported in some version of ip/kernel
sed -E "s/(nexthop via .*) pref [[:alnum:]]*/\1 /"
......@@ -32,3 +22,8 @@ strip_link_local_routes() {
# remove 'local' kernel routes for link-local networks (for local or vrf tables)
egrep -v '^(anycast|local) fe80|^fe80::/64|^ff00::/8'
}
strip_trailing_space() {
# remove trailing spaces
sed -E 's/[[:space:]]+$//'
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment