#
595f220e |
| 07-Apr-1999 |
Brian Somers <brian@FreeBSD.org> |
Add realhostname() - a function to correctly lookup a name by address and ensure that the name resolves back to the original address.
|
Revision tags: release/6.4.0_cvs, release/6.4.0 |
|
#
ca938a2c |
| 25-Nov-2008 |
Tai-hwa Liang <avatar@FreeBSD.org> |
Fixing !INET6 builds.
|
#
31cfde71 |
| 05-Nov-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Like many other functions that handle sockaddrs, realhostname_sa() takes a struct sockaddr * that it casts internally to the appropriate type based on sa_family. However, struct sockaddr has very la
Like many other functions that handle sockaddrs, realhostname_sa() takes a struct sockaddr * that it casts internally to the appropriate type based on sa_family. However, struct sockaddr has very lax alignment requirements, which causes the compiler to complain when you cast a struct sockaddr * to, say, a struct sockaddr_in6 *.
I find it reasonable to assume that the pointer we received is in fact correctly aligned. Therefore, we can work around the compiler warnings by casting to void * before casting to the desired type. For readability's sake, this is done with macros.
The same technique should prove useful in other parts of the tree that deal with socket addresses.
MFC after: 3 weeks
show more ...
|
#
0ea291e2 |
| 17-Oct-2008 |
Xin LI <delphij@FreeBSD.org> |
Use strlcpy() when we mean it.
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
#
4f101318 |
| 13-May-2005 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now.
|
Revision tags: release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
547fa0d9 |
| 18-Oct-2003 |
Mark Murray <markm@FreeBSD.org> |
ANSIfy, WARNSify, CONSTify. Bit of style(9)-ify.
|
#
0ebec5d3 |
| 14-Jun-2003 |
Mark Murray <markm@FreeBSD.org> |
Tidy up. Sort headers.
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
82684fa6 |
| 07-Jun-2002 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
Return HOSTNAME_INVALIDADDR when reverse lookup is fail.
Submitted by: Sergey Zorin <sergey@cc.tpu.edu.ru>
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
8719c58f |
| 01-Oct-2001 |
Matthew Dillon <dillon@FreeBSD.org> |
Add __FBSDID()s to libutil
|
#
27daeab3 |
| 23-Jul-2001 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
Simplify IPv4 mapped IPv6 address handling.
Reviewed by: brian MFC after: 5 days
|
#
3ee63d39 |
| 21-Jul-2001 |
Brian Somers <brian@FreeBSD.org> |
Hint getaddrinfo() correctly if we're looking up a name that we got from an AF_INET6 address.
MFC after: 1 week
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
ec86eec7 |
| 14-Mar-2001 |
Brian Somers <brian@FreeBSD.org> |
MAXHOSTNAMELEN includes space for the NUL Don't read past the end of the host passed to realhostname()
Not objected to by: freebsd-audit Interface disliked by: imp
|
#
f169f2f0 |
| 28-Jan-2001 |
Brian Somers <brian@FreeBSD.org> |
Call trimdomain properly for ip4 addresses.
PR: 24659 realhostname_sa() stuff submitted by: Jim.Pirzyk@disney.com
|
Revision tags: release/4.2.0, release/4.1.1_cvs, release/4.1.0 |
|
#
6484396e |
| 14-Jul-2000 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
Sshd writes connected host into utmp directly. If the connection is via IPv6, the hostname is trimed due to the length of IPv6 address. This change saves it as possible. I have a grudge against the
Sshd writes connected host into utmp directly. If the connection is via IPv6, the hostname is trimed due to the length of IPv6 address. This change saves it as possible. I have a grudge against the shortage of UT_HOSTSIZE.
show more ...
|
Revision tags: release/3.5.0_cvs |
|
#
4efe647d |
| 24-May-2000 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
We should see the ai_canonname menber of the first addrinfo structure in the linked list. RFC2553 mentions only first.
Reviewed by: shin
|
#
9ed4e87c |
| 23-Mar-2000 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
Return IPv4 native address for IPv4 mapped IPv6 address, even if A RR is not found.
Reviewed by: shin
|
Revision tags: release/4.0.0_cvs |
|
#
88f853e0 |
| 07-Mar-2000 |
Hajimu UMEMOTO <ume@FreeBSD.org> |
Since crypto/openssh/login.c was changed to use realhostname_sa(), when connecting via IPv6, hostname was not recorded to utmp anymore. Because, if hostname is longer than buffer size, getnameinfo()
Since crypto/openssh/login.c was changed to use realhostname_sa(), when connecting via IPv6, hostname was not recorded to utmp anymore. Because, if hostname is longer than buffer size, getnameinfo() returns with ENI_MEMORY.
Reviewed by: shin Approved by: jkh
show more ...
|
#
01d81a03 |
| 27-Jan-2000 |
Yoshinobu Inoue <shin@FreeBSD.org> |
Avoid core dump when ai_canonname is NULL. (Now this happens for numeric addrs, as getaddrinfo() 1.3 -> 1.4 change)
Reviewed by: Mark Huizer <xaa@timewasters.nl>
|
#
0cac72f4 |
| 25-Jan-2000 |
Yoshinobu Inoue <shin@FreeBSD.org> |
several tcp apps IPv6 update -inetd -rshd -rlogind -telnetd -rsh -rlogin
Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
|
Revision tags: release/3.4.0_cvs, release/3.3.0_cvs |
|
#
7f3dea24 |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
Revision tags: release/3.2.0 |
|
#
bc19c851 |
| 07-Apr-1999 |
Brian Somers <brian@FreeBSD.org> |
Put parenthesis around sizeof args. Allow for host names up to MAXHOSTNAMELEN - 1 in length.
Prompted by: bde
|
#
595f220e |
| 07-Apr-1999 |
Brian Somers <brian@FreeBSD.org> |
Add realhostname() - a function to correctly lookup a name by address and ensure that the name resolves back to the original address.
|