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
mf
go-multiaddr
Commits
2bb75c72
Commit
2bb75c72
authored
Jan 12, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed link local check
parent
8359bd0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ip.go
ip.go
+2
-2
No files found.
ip.go
View file @
2bb75c72
...
...
@@ -70,11 +70,11 @@ func IsIPLoopback(m ma.Multiaddr) bool {
}
// IP6 Link Local addresses are non routable. The prefix is technically
// fe80::/10, but we test fe80::/1
2
for simplicity (no need to mask).
// fe80::/10, but we test fe80::/1
6
for simplicity (no need to mask).
// So far, no hardware interfaces exist long enough to use those 2 bits.
// Send a PR if there is.
func
IsIP6LinkLocal
(
m
ma
.
Multiaddr
)
bool
{
return
bytes
.
HasPrefix
(
m
.
Bytes
(),
[]
byte
{
ma
.
P_IP6
,
0xfe
,
0x80
,
0
})
return
bytes
.
HasPrefix
(
m
.
Bytes
(),
[]
byte
{
ma
.
P_IP6
,
0xfe
,
0x80
})
}
// IsIPUnspecified returns whether a Multiaddr is am Unspecified IP address
...
...
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