diff options
author | ume <ume@FreeBSD.org> | 2004-05-31 21:09:14 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2004-05-31 21:09:14 +0000 |
commit | d5d90e314729317ee9cce434f3c548b3f4aaaf04 (patch) | |
tree | 20b8d52a3caa9c08063b44f22b778058ddce3986 /lib/libc | |
parent | 13656d723eee1f2d6f9df683f7b76b0c94eef8ef (diff) | |
download | FreeBSD-src-d5d90e314729317ee9cce434f3c548b3f4aaaf04.zip FreeBSD-src-d5d90e314729317ee9cce434f3c548b3f4aaaf04.tar.gz |
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.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 6c4ba51..f88a58f 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -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); |