Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-netroute
Commits
84fa8782
Unverified
Commit
84fa8782
authored
Mar 08, 2020
by
Will Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specificity edge cases
parent
13054871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
common.go
common.go
+8
-2
No files found.
common.go
View file @
84fa8782
...
...
@@ -135,8 +135,14 @@ func (r *router) route(routes routeSlice, input net.HardwareAddr, src, dst net.I
continue
}
if
mostSpecificRt
!=
nil
{
candSpec
,
_
:=
rt
.
Dst
.
Mask
.
Size
()
if
curSpec
,
_
:=
mostSpecificRt
.
Dst
.
Mask
.
Size
();
candSpec
<
curSpec
{
var
candSpec
,
curSpec
int
if
rt
.
Dst
!=
nil
{
candSpec
,
_
=
rt
.
Dst
.
Mask
.
Size
()
}
if
mostSpecificRt
.
Dst
!=
nil
{
curSpec
,
_
=
mostSpecificRt
.
Dst
.
Mask
.
Size
()
}
if
candSpec
<
curSpec
{
continue
}
}
...
...
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