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
1e73e463
Unverified
Commit
1e73e463
authored
Mar 08, 2020
by
Will Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup
parent
fb84409e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
netroute_linux.go
netroute_linux.go
+6
-1
netroute_windows.go
netroute_windows.go
+1
-1
No files found.
netroute_linux.go
View file @
1e73e463
...
...
@@ -21,8 +21,13 @@ func (r *router) RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface *n
if
dst
.
Equal
(
preferredSrc
)
{
gateway
=
nil
}
return
iface
,
gateway
,
preferredSrc
,
err
}
func
New
()
(
routing
.
Router
,
error
)
{
return
router
{
routing
.
New
()}
r
,
err
:=
routing
.
New
()
if
err
!=
nil
{
return
nil
,
err
}
return
router
{
r
},
nil
}
netroute_windows.go
View file @
1e73e463
...
...
@@ -222,7 +222,7 @@ func (r *winRouter) RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface
}
iface
=
getIface
(
route
.
index
)
if
route
nextHop
==
nil
||
route
.
nextHop
.
Addr
.
Family
==
0
/* AF_UNDEF */
{
if
route
.
nextHop
==
nil
||
route
.
nextHop
.
Addr
.
Family
==
0
/* AF_UNDEF */
{
return
iface
,
nil
,
pref
,
nil
}
addr
,
err
:=
route
.
nextHop
.
Sockaddr
()
...
...
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