Age | Commit message (Collapse) | Author |
|
As recently reported on the Buildroot list:
http://lists.busybox.net/pipermail/buildroot/2016-March/155325.html
DNS lookups with Node.js currently fails on uClibc-ng. The reason for this
is the way AI_V4MAPPED is handled. According to POSIX, AI_V4MAPPED should
be ignored unless ai_family is AF_INET6:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html
If the AI_V4MAPPED flag is specified along with an ai_family of AF_INET6,
then getaddrinfo() shall return IPv4-mapped IPv6 addresses on finding no
matching IPv6 addresses (ai_addrlen shall be 16). The AI_V4MAPPED flag
shall be ignored unless ai_family equals AF_INET6.
uClibc-ng was also handling AI_V4MAPPED for AF_UNSPEC, fix that.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
|
order
Implement simplest variant of /etc/gai.conf to control getaddrinfo
IPv6/IPv4 addresses sorting. Keep the default sort order - IPv6 first,
IPv4 second. To invert it, create /etc/gai.conf containing single line:
precedence ::ffff:0:0/96 100
Example before:
$ nslookup security.debian.org 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com
Name: security.debian.org
Address 1: 2001:a78:5:0:216:35ff:fe7f:be4f villa.debian.org
Address 2: 2001:a78:5:1:216:35ff:fe7f:6ceb lobos.debian.org
Address 3: 195.20.242.89 wieck.debian.org
Address 4: 212.211.132.250 lobos.debian.org
Address 5: 212.211.132.32 villa.debian.org
After patch & precedence set in /etc/gai.conf:
$ nslookup security.debian.org 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com
Name: security.debian.org
Address 1: 195.20.242.89 wieck.debian.org
Address 2: 212.211.132.250 lobos.debian.org
Address 3: 212.211.132.32 villa.debian.org
Address 4: 2001:a78:5:0:216:35ff:fe7f:be4f villa.debian.org
Address 5: 2001:a78:5:1:216:35ff:fe7f:6ceb lobos.debian.org
bloat-o-meter report:
function old new delta
getaddrinfo 726 1138 +412
gaih_inet 2660 2692 +32
.rodata 16618 16643 +25
__gai_precedence - 1 +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 882/0) Total: 470 bytes
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
mkostemp(char *template, int flags) generates a unique temporary
filename from a template. The flags parameter accepts three of
the same flags as open(2): O_APPEND, O_CLOEXEC, and O_SYNC. The
current implementation of mkostemp(3) does not respect the flags
and in fact confuses the flags with the file mode which should
always be S_IRUSR | S_IWUSR. This patch corrects this issue.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
make it clear, that the code is disabled
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
__check_pf() function is called from getaddrinfo() and it calls
getifaddrs(), which is too much overhead especially if RSBAC-Net
is enabled. So with this patch __check_pf() is being called only
when AI_ADDRCONFIG hint flag is specified - just when we really
need that check.
Signed-off-by: Alexander Komyagin <komyagin@altell.ru>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Posix says that canonname should use the text representation of an IP address
when a numerical nodename given
See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
Signed-off-by: Ed Wildgoose <lists@wildgooses.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This appears to correspond to what glibc does and this fixes an
issue with iptables-1.4.11 with udp and raw port numbers.
(see http://bugzilla.netfilter.org/show_bug.cgi?id=721)
This fixes #3841
https://bugs.busybox.net/show_bug.cgi?id=3841
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Also, freeaddrinfo(NULL) is ok, no need to check parameted for NULL
before calling it.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
disable IPv6 related stuff if feature is disabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
This is needed because tls.h ends up includeing nptl/descr.h
which needs the full res_state definition. resolv.h also ends up
including tls.h, but _without_ the full res_state struct it errors.
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
sem_open(3) needs to create a temporary file in a way which can't
be efficiently implemented in terms of POSIX API. Extend
__gen_tempname with mode_t mode argument in order to ease
sem_open implementation.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *)
sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *)
should be a nop
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
ifaddrs.c: cosmetics, no code changes
|
|
remove one superfluous statement.
|
|
|
|
Appears to build fine (several .configs tried)
|
|
|
|
|
|
|
|
|
|
|
|
avoid using zero-filled constants in bss:
text data bss dec hex filename
3182 24 48 3254 cb6 getaddrinfo_old.o
3280 0 0 3280 cd0 getaddrinfo.o
|
|
|
|
it conditionally included among the installed header files depending on
UCLIBC_HAS_AI_ADDRCONFIG.
|
|
|
|
instead of modifying the contents of two bools.
|
|
need the file outside of uClibc anyway.
|
|
getaddrinfo(3).
|
|
like
o UCLIBC_HAS_GNU_ERROR
o UCLIBC_HAS_BSD_ERR
o UCLIBC_HAS_PTY
o UCLIBC_HAS_GETPT (1)
o UCLIBC_SYSCALL_STUBS
o UCLIBC_SYSCALL_STUB_WARNING
o UCLIBC_LINUX_SPECIFIC (2)
o UCLIBC_BSD_SPECIFIC (3)
o UCLIBC_NTP_LEGACY (4)
o UCLIBC_SV4_DEPRECATED (5)
o UCLIBC_HAVE_REALTIME (6)
o UCLIBC_HAVE_ADVANCED_REALTIME (7)
o UCLIBC_HAVE_EPOLL (8)
o UCLIBC_HAVE_XATTR (9)
o UCLIBC_HAVE_PROFILING (10)
(1) make non-standard getpt optional and implement standard posix_openpt
(2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(),
personality()
ppoll(), setresuid()
(3) mincore(), getdomainname(), setdomainname()
(4) ntp_adjtime(), ntp_gettime() aliases
(5) ustat() [use statfs(2) in your code instead]
(6) All marked as "(REALTIME)" in SUSv3
(7) All marked as "(ADVANCED REALTIME)" in SUSv3
(8) epoll_create(), epoll_ctl(), epoll_wait()
(9) all Extended Attributes
(10) helpers for gcc's -finstrument-functions
- Fixes _dl_exit()
- Implements sleep(3) for !UCLIBC_HAVE_REALTIME
- Implements usleep(3) for !UCLIBC_HAVE_REALTIME
- adds #warning about incorrect posix_fadvise{,64}()
- removes unused and unwanted uselib()
Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead
of formerly 130k.
|
|
in string.h and strings.h. This caught unguarded string ops in
libc/inet/ethers.c __ether_line_w() function.
I will wait for fallout reports for a week or so,
then continue converting more libc_hidden_proto's.
|
|
The following definitions in getaddrinfo.c seem redundant as they _are_
defined in the public netdb.h header, contrary to the comment. AI_DEFAULT
is not, however it is not used in the file either so can be safely
removed.
|
|
when AI_NUMERICSERV flag set.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
|
|
is a useless attempt
|
|
|
|
|
|
missing headers, other jump relocs removed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|