Skip to content

Commit

Permalink
dht bootstrap ignores the unsupported addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Jul 24, 2022
1 parent 6022602 commit 319b24e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dht/dht_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ func (s *Server) Bootstrap(addrs []string) {
}

for _, a := range as {
if isIPv6(a.IP) {
if !s.ipv6 {
continue
}
} else if !s.ipv4 {
continue
}

if err = s.FindNode(a.UDPAddr(), s.conf.ID); err != nil {
s.conf.ErrorLog(`fail to bootstrap '%s': %s`, a.String(), err)
}
Expand Down

0 comments on commit 319b24e

Please sign in to comment.