mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 08:33:24 +00:00
Treat IPv4 private address as global scope rather than site scope.
Though it breaks RFC 3484, without this change, dest addr selection doesn't work well under NAT environment.
This commit is contained in:
parent
e79962dbce
commit
251b48a1bb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129905
@ -1089,7 +1089,7 @@ gai_addr2scopetype(sa)
|
||||
(((u_char *)&sa4->sin_addr)[1] & 0xf0) == 16) ||
|
||||
(((u_char *)&sa4->sin_addr)[0] == 192 &&
|
||||
((u_char *)&sa4->sin_addr)[1] == 168))
|
||||
return(5);
|
||||
return(14); /* XXX: It should be 5 unless NAT */
|
||||
/* Loopback addresses have link-local scope. */
|
||||
if (((u_char *)&sa4->sin_addr)[0] == 127)
|
||||
return(2);
|
||||
|
Loading…
Reference in New Issue
Block a user