Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
bird-tools
Commits
6fe79939
Commit
6fe79939
authored
Mar 03, 2021
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netlab: Do not strip link-local addresses
As they are now stable.
parent
5f5460ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
15 deletions
+7
-15
.gitignore
.gitignore
+1
-2
netlab/tests/get_stdout_bird
netlab/tests/get_stdout_bird
+0
-1
netlab/tests/get_stdout_krt
netlab/tests/get_stdout_krt
+1
-2
netlab/tests/strip_output
netlab/tests/strip_output
+5
-10
No files found.
.gitignore
View file @
6fe79939
...
...
@@ -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
...
...
netlab/tests/get_stdout_bird
View file @
6fe79939
...
...
@@ -4,5 +4,4 @@
cd
$1
&&
./birdc
-l
show route
$2
$3
\
| strip_version
\
| strip_timestamp
\
| strip_addresses
\
| ../tests/sort_show_route
netlab/tests/get_stdout_krt
View file @
6fe79939
...
...
@@ -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
netlab/tests/strip_output
View file @
6fe79939
...
...
@@ -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:]]+$//'
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment