| Commit message (Expand) | Author | Age | Files | Lines |
| * | remove scanf dependency from getaddrinfo /etc/services support | Rich Felker | 2012-07-22 | 1 | -5/+4 |
| * | getaddrinfo /etc/services lookup support | Rich Felker | 2012-07-22 | 1 | -3/+16 |
| * | make getservby*_r return error code rather than -1 (and using errno)•••untested but should be correct..
| Rich Felker | 2012-07-22 | 2 | -19/+35 |
| * | fix logic error for skipping failed interfaces in if_nameindex | Rich Felker | 2012-07-21 | 1 | -8/+7 |
| * | fix getservby*() with null pointer for protocol argument•••not sure this is the best fix but it should work
| Rich Felker | 2012-07-14 | 2 | -0/+8 |
| * | workaround another sendmsg kernel bug on 64-bit machines•••the kernel wrongly expects the cmsg length field to be size_t instead
of socklen_t. in order to work around the issue, we have to impose a
length limit and copy to a local buffer. the length limit should be
more than sufficient for any real-world use; these headers are only
used for passing file descriptors and permissions between processes
over unix sockets.
| Rich Felker | 2012-07-12 | 1 | -0/+13 |
| * | fix misplaced semicolon in preprocessor directive (#undef h_errno) | Rich Felker | 2012-05-16 | 1 | -1/+1 |
| * | use __h_errno_location for h_errno•••we do not bother making h_errno thread-local since the only interfaces
that use it are inherently non-thread-safe. but still use the
potentially-thread-local ABI to access it just to avoid lock-in.
| Rich Felker | 2012-05-12 | 2 | -0/+9 |
| * | improve name lookup performance in corner cases•••the buffer in getaddrinfo really only matters when /etc/hosts is huge,
but in that case, the huge number of syscalls resulting from a tiny
buffer would seriously impact the performance of every name lookup.
the buffer in __dns.c has also been enlarged a bit so that typical
resolv.conf files will fit fully in the buffer. there's no need to
make it so large as to dominate the syscall overhead for large files,
because resolv.conf should never be large.
| Rich Felker | 2012-04-01 | 2 | -2/+2 |
| * | fix for previous incorrect fix of cancellation in dns lookups•••uninitialized file descriptor was being closed on return, causing
stdin to be closed in many cases.
| Rich Felker | 2012-02-23 | 1 | -3/+4 |
| * | fix default nameserver when resolv.conf doesn't exist | Rich Felker | 2012-02-11 | 1 | -1/+2 |
| * | fix illegal goto out of cleanup context in dns lookups | Rich Felker | 2012-02-11 | 1 | -3/+3 |
| * | make dns lookups (and thus getaddrinfo) cancellable | Rich Felker | 2011-09-21 | 1 | -4/+11 |
| * | use poll rather than select in dns lookups (also clock_gettime)•••if the file descriptor resource limit has been increased past
FD_SETSIZE, this is actually a security issue; we could write past the
end of the fd_set object. using poll makes it a non-issue, and
simplifies the code at the same time.
also, use clock_gettime instead of gettimeofday, for reduced bloat
and better entropy.
| Rich Felker | 2011-09-21 | 1 | -12/+10 |
| * | remove some stray trailing space characters | Rich Felker | 2011-09-13 | 2 | -2/+2 |
| * | implement if_nameindex and if_freenameindex | Rich Felker | 2011-08-03 | 2 | -0/+65 |
| * | fix wrong messages in gai_strerror•••i had missed the fact that a couple values were unassigned...
| Rich Felker | 2011-08-01 | 1 | -0/+2 |
| * | port numbers should always be interpreted as decimal•••per POSIX and RFC 3493:
If the specified address family is AF_INET, AF_INET6, or AF_UNSPEC,
the service can be specified as a string specifying a decimal port
number.
021 is a valid decimal number, therefore, interpreting it as octal
seems to be non-conformant.
| Rich Felker | 2011-08-01 | 1 | -1/+1 |
| * | "implement" getnetbyaddr and getnetbyname•••these are useless legacy functions but some old software contains
cruft that expects them to exist...
| Rich Felker | 2011-07-12 | 1 | -0/+12 |
| * | res_search symbol, aliased to res_query for now (better than nothing) | Rich Felker | 2011-06-30 | 1 | -0/+3 |
| * | fix bug in ipv6 parsing that prevented parsing a lone "::" | Rich Felker | 2011-04-25 | 1 | -4/+1 |
| * | ipv6 parsing code (formerly dummied-out) | Rich Felker | 2011-04-25 | 2 | -8/+62 |
| * | fix bogus return values for inet_pton | Rich Felker | 2011-04-21 | 1 | -2/+2 |
| * | disallow blank strings as service or host name | Rich Felker | 2011-04-20 | 1 | -0/+3 |
| * | fix bugs in ipv4 parsing | Rich Felker | 2011-04-20 | 1 | -1/+2 |
| * | dns lookups: protect against cancellation and fix incorrect error codes | Rich Felker | 2011-04-18 | 1 | -4/+10 |
| * | overhaul pthread cancellation•••this patch improves the correctness, simplicity, and size of
cancellation-related code. modulo any small errors, it should now be
completely conformant, safe, and resource-leak free.
the notion of entering and exiting cancellation-point context has been
completely eliminated and replaced with alternative syscall assembly
code for cancellable syscalls. the assembly is responsible for setting
up execution context information (stack pointer and address of the
syscall instruction) which the cancellation signal handler can use to
determine whether the interrupted code was in a cancellable state.
these changes eliminate race conditions in the previous generation of
cancellation handling code (whereby a cancellation request received
just prior to the syscall would not be processed, leaving the syscall
to block, potentially indefinitely), and remedy an issue where
non-cancellable syscalls made from signal handlers became cancellable
if the signal handler interrupted a cancellation point.
x86_64 asm is untested and may need a second try to get it right.
| Rich Felker | 2011-04-17 | 6 | -28/+6 |
| * | optimize ntohl etc. in terms of bswap functions•••we can do this without violating the namespace now that they are
macros/inline functions rather than extern functions. the motivation
is that gcc was generating giant, slow, horrible code for the old
functions, and now generates a single byte-swapping instruction.
| Rich Felker | 2011-04-12 | 4 | -20/+12 |
| * | workaround broken msghdr struct on 64bit linux•••POSIX clearly specifies the type of msg_iovlen and msg_controllen, and
Linux ignores it and makes them both size_t instead. to work around
this we add padding (instead of just using the wrong types like glibc
does), but we also need to patch-up the struct before passing it to
the kernel in case the caller did not zero-fill it.
if i could trust the kernel to just ignore the upper 32 bits, this
would not be necessary, but i don't think it will ignore them...
| Rich Felker | 2011-04-08 | 2 | -0/+21 |
| * | fix ipv6 address printing: 2001 appeared as 201, etc. | Rich Felker | 2011-04-08 | 1 | -3/+5 |
| * | fix broken dns response parsing code that made most ipv6 lookups fail | Rich Felker | 2011-04-08 | 1 | -4/+6 |
| * | return the requested string as the "canonical name" for numeric addresses•••previously NULL was returned in ai_canonname, resulting in crashes in
some callers. this behavior was incorrect. note however that the new
behavior differs from glibc, which performs reverse dns lookups. POSIX
is very clear that a reverse DNS lookup must not be performed for
numeric addresses.
| Rich Felker | 2011-04-08 | 1 | -0/+1 |
| * | fix uninitialized variables in dns lookup code | Rich Felker | 2011-04-07 | 1 | -2/+2 |
| * | add _res (__res_state()) dummy | Rich Felker | 2011-04-06 | 1 | -0/+9 |
| * | implement if_indextoname and if_nametoindex functions | Rich Felker | 2011-04-05 | 2 | -0/+36 |
| * | fix all implicit conversion between signed/unsigned pointers•••sadly the C language does not specify any such implicit conversion, so
this is not a matter of just fixing warnings (as gcc treats it) but
actual errors. i would like to revisit a number of these changes and
possibly revise the types used to reduce the number of casts required.
| Rich Felker | 2011-03-25 | 1 | -1/+1 |
| * | cleanup socketcall syscall interface to ease porting to sane(r) archs | Rich Felker | 2011-02-15 | 19 | -94/+17 |
| * | another pointer signedness fix | Rich Felker | 2011-02-14 | 1 | -1/+1 |
| * | initial check-in, version 0.5.0 | Rich Felker | 2011-02-12 | 55 | -0/+1570 |