Skip to content

Commit

Permalink
Update a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiyukiMineo committed Apr 30, 2024
1 parent 9037ea3 commit fb6cf54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonyflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func privateIPv4(interfaceAddrs types.InterfaceAddrs) (net.IP, error) {
}

func isPrivateIPv4(ip net.IP) bool {
// Allow private IP subnets (RFC1918) or link local (RFC3927)
// Allow private IP addresses (RFC1918) and link-local addresses (RFC3927)
return ip != nil &&
(ip[0] == 10 || ip[0] == 172 && (ip[1] >= 16 && ip[1] < 32) || ip[0] == 192 && ip[1] == 168 || ip[0] == 169 && ip[1] == 254)
}
Expand Down

0 comments on commit fb6cf54

Please sign in to comment.