diff options
author | ume <ume@FreeBSD.org> | 2013-01-09 15:22:37 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2013-01-09 15:22:37 +0000 |
commit | 3d32a931a1a2fa6cbcda4ecc497192795994945f (patch) | |
tree | 6aeb158d95d855c0215cf403dc0032d197b81900 /lib/libc/net | |
parent | b63b7017bb1a90be6087cf288cd64b04b1d65fe4 (diff) | |
download | FreeBSD-src-3d32a931a1a2fa6cbcda4ecc497192795994945f.zip FreeBSD-src-3d32a931a1a2fa6cbcda4ecc497192795994945f.tar.gz |
Disable destination address selection support of
getipnodebyname(1). RFC 2553 mentions IPv6 addresses
are returned 1st.
Spotted by: uqs
MFC after: 1 week
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/name6.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index 0031f46..4d7cf79 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -200,6 +200,7 @@ static struct hostent *_hpmapv6(struct hostent *, int *); #endif static struct hostent *_hpsort(struct hostent *, res_state); +#ifdef ENABLE_IP6ADDRCTL static struct hostent *_hpreorder(struct hostent *); static int get_addrselectpolicy(struct policyhead *); static void free_addrselectpolicy(struct policyhead *); @@ -209,6 +210,7 @@ static void set_source(struct hp_order *, struct policyhead *); static int matchlen(struct sockaddr *, struct sockaddr *); static int comp_dst(const void *, const void *); static int gai_addr2scopetype(struct sockaddr *); +#endif /* * Functions defined in RFC2553 @@ -309,7 +311,11 @@ getipnodebyname(const char *name, int af, int flags, int *errp) *errp = statp->res_h_errno; statp->options = options; +#ifdef ENABLE_IP6ADDRCTL return _hpreorder(_hpsort(hp, statp)); +#else + return _hpsort(hp, statp); +#endif } struct hostent * @@ -632,6 +638,7 @@ _hpsort(struct hostent *hp, res_state statp) return hp; } +#ifdef ENABLE_IP6ADDRCTL /* * _hpreorder: sort address by default address selection */ @@ -1109,3 +1116,4 @@ gai_addr2scopetype(struct sockaddr *sa) return(-1); } } +#endif |