summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
Commit message (Collapse)AuthorAgeFilesLines
* Merge r309688: address regressions in SA-16:37.libc.glebius2016-12-071-6/+5
| | | | | | PR: 215105 Submitted by: <jtd2004a sbcglobal.net> Approved by: so
* Fix possible login(1) argument injection in telnetd(8). [SA-16:36]glebius2016-12-061-17/+34
| | | | | | | | | | | | | | | | Fix link_ntoa(3) buffer overflow in libc. [SA-16:37] Fix possible escape from bhyve(8) virtual machine. [SA-16:38] Fix warnings about valid time zone abbreviations. [EN-16:19] Update timezone database information. [EN-16:20] Fix incorrectly defined unicode character(s). [EN-16:21] Security: FreeBSD-SA-16:36.telnetd Security: FreeBSD-SA-16:37.libc Security: FreeBSD-SA-16:38.bhyve Errata Notice: FreeBSD-EN-16:19.tzcode Errata Notice: FreeBSD-EN-16:20.tzdata Errata Notice: FreeBSD-EN-16:21.localedef Approved by: so
* Revert r301707ngie2016-06-081-2/+2
| | | | | | | | | getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and I didn't verify that it worked before committing the change MFC after: 1 week X-MFC with: r301707 Pointyhat to: ngie
* Use NULL instead of `0` in _ht_getnetbyname(..)ngie2016-06-081-2/+2
| | | | | | | | - getnetent returns NULL on completion/error. - .h_aliases is NULL terminated. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Don't call free_addrselectpolicy(&policyhead) before policyhead has beentruckman2016-05-161-1/+0
| | | | | | | initialized. Reported by: Coverity CID: 1018727
* Rename dprintf into dbg_printf to avoid collision with dprintf(3)bapt2016-05-101-10/+10
| | | | | When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added. This rename is made in preparation for the removal of this guard
* libc: spelling fixes.pfg2016-04-306-7/+7
| | | | Mostly on comments.
* Minor indentation issue.pfg2016-04-201-2/+1
|
* libc: use our roundup2/rounddown2() macros when param.h is available.pfg2016-04-202-5/+5
| | | | | rounddown2 tends to produce longer lines than the original code but still it makes the code more readable.
* libc: do not include <sys/types.h> where <sys/param.h> was already includedavos2016-04-1812-13/+1
| | | | | | According to style(9): > normally, include <sys/types.h> OR <sys/param.h>, but not both. (<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
* libc: make some more use of the nitems() macro.pfg2016-04-162-5/+5
| | | | | | | | We have an nitems() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Given that it is available already without adding additional headers and other parts of libc already use it, extend a bit more its use.
* libc: cleanup unnecessary semicolons.pfg2016-04-111-7/+7
| | | | Found with devel/coccinelle.
* libc: replace 0 with NULL for pointers.pfg2016-04-104-5/+6
| | | | | | | | | While here also cleanup some surrounding code; particularly drop some malloc() casts. Found with devel/coccinelle. Reviewed by: bde (previous version - all new bugs are mine)
* Implement (ACFLAGS|CFLAGS|CXXFLAGS).SRC globally.bdrewery2016-03-261-1/+0
| | | | Sponsored by: EMC / Isilon Storage Division
* sendmsg(3) -> sendmsg(2)trasz2016-02-292-2/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Replace nslexer.l->nslexer.c custom rule with a -D CFLAG.bdrewery2016-01-271-8/+3
| | | | | | | | | | | This avoids reproducing the lex logic which had dependencies set wrong and used an intermediate file for modifying the YY_BUF_SIZE. This has only been possible since flex 2.5.37 was imported in r250873, which uses #ifndef YY_BUF_SIZE. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* nslexer.c does not depend on nsparser.h.bdrewery2016-01-271-1/+1
| | | | | | | | | | nslexer.o depends on nsparser.h, which is already added by bsd.lib.mk and .depend. This reverts r237402. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* sctp_sendx() needs to provide the assoc_id back.tuexen2016-01-241-2/+7
| | | | MFC after: 3 days
* sctp_sendv() needs to fill in the association id on return.tuexen2016-01-241-0/+7
| | | | MFC after: 3 days
* Remove _gethostbynisname() and _gethostbynisaddr(). These functionsume2015-12-252-57/+0
| | | | | | used to be called from getipnodebyname(). MFC after: 1 week
* We don't need to use a temporary buffer, here.ume2015-12-221-7/+3
| | | | MFC after: 1 week
* Use _map_v4v6_address().ume2015-12-211-4/+3
| | | | MFC after: 1 week
* Simplify _map_v4v6_address().ume2015-12-211-7/+3
| | | | | Suggested by: hrs MFC after: 1 week
* If we end up following a CNAME chain that does not findume2015-12-211-1/+6
| | | | | | | | any data return that instead of internal error. PR: 156684 Obtained from: NetBSD MFC after: 1 week
* libc: Use namespace.h in a few more files.jilles2015-12-201-5/+7
| | | | | libc now no longer calls fstat(), socketpair() and wait(), only the underscore-prefixed versions (_waitpid() instead of wait()).
* addrinfo.ai_family is an address family, not a protocol family.ume2015-12-201-8/+8
| | | | | PR: 162434 MFC after: 1 week
* Use _map_v4v6_address().ume2015-12-181-4/+3
| | | | | Suggested by: hrs MFC after: 1 week
* Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).ume2015-12-182-28/+174
| | | | | PR: 198092 MFC after: 1 week
* RFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.ume2015-12-121-1/+1
| | | | | | | | | Since it breaks certain jail setup, we ignore just 127.0.0.1 instead of whole loopback address range. PR: 192014 Reviewed by: hrs MFC after: 1 week
* The calls to RES_SET_H_ERRNO() macro on error paths wind upume2015-12-101-1/+2
| | | | | | | | dereferencing an uninitialized res. PR: 202142 Submitted by: Sean Boudreau MFC after: 1 week
* sdl->sdl_len in sockaddr_dl can be longer thanhrs2015-11-031-3/+13
| | | | sizeof(struct sockaddr_dl).
* - address grammarjgh2015-10-051-7/+6
| | | | | | | | PR: 203440 (based on) Submitted by: ceratv@rpi.edu Approved by: wblock@ (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3813
* - Move PF_LOCAL at the end of the array. PF_INET{,6} is used more often.hrs2015-10-031-7/+9
| | | | | | | - Add SOCKTYPE_ANY to PF_LOCAL. - Apply AI_CANONNAME to only AF_INET{,6}. It is not meaningful for the other AFs.
* Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-45/+16
|
* Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-209-49/+20
|
* Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.rodrigc2015-09-205-20/+20
|
* Add declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-201-0/+10
|
* Define _NS_PRIVATE to make declarations visible.rodrigc2015-09-201-0/+1
| | | | This eliminates -Wmissing-prototypes warnings.
* Add missing includes to eliminate -Wmissing-prototypes warningsrodrigc2015-09-202-0/+3
|
* Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):hrs2015-09-204-78/+205
| | | | | | | | | | | | | - In a PF_LOCAL address, "hostname" must begins with '/' and "servname" is always NULL. All of ai_flags are ignored. - PF_UNSPEC matches PF_LOCAL. EAI_SERVICE is not returned to make AF-independent programming easier; "servname" is always ignored in PF_LOCAL. In practice, PF_INET* and PF_LOCAL are mutually-exclusive because a hostname which begins with '/' is invalid in PF_INET*. No domain name resolution is performed for a PF_LOCAL address. Differential Revision: https://reviews.freebsd.org/D3634
* libc: Consistently call _ioctl() internally, not ioctl().jilles2015-09-191-1/+3
|
* Zero out a local variable also when PURIFY is not defined.tuexen2015-09-101-2/+0
| | | | | | | | | | | | This silence a warning brought up by valgrind whenever if_nametoindex is used. This was already discussed in PR 166483, but the code committed in r234329 guards the initilization with #ifdef PURIFY. Therefore, valgrind still complains. Since this code is not performance critical, always zero out the local variable to silence valgrind. PR: 166483 Discussed with: eadler@ MFC after: 4 weeks
* - Fix SIGSEGV when sa == NULL. NULL check in getnameinfo_inet()hrs2015-09-091-12/+8
| | | | | | | | did not work as expected. - Simplify afdl table lookup. MFC after: 3 days
* - snprintf() returns at most size-1 of the chars printed intohrs2015-09-021-10/+6
| | | | | | | | the buffer. (n == hostlen) also means the buffer length was too short. - Use sdl->sdl_data only when (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0) to prevent redundant output.
* Print sdl->sdl_data when sdl->sdl_nlen > 0 as link_ntoa(3) does.hrs2015-09-011-6/+18
| | | | MFC after: 1 week
* Switch libc from using _sig{procmask,action,suspend} symbols, whichkib2015-08-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. Since e.g. _sigaction is not interposed by libthr, calling signal() removes thr_sighandler() from the handler slot etc. The result was breaking signal semantic and rtld locking. The added __libc_sigprocmask and other symbols are hidden, they are not exported and cannot be called through PLT. The setjmp/longjmp functions for x86 were changed to use direct calls, and since PIC_PROLOGUE only needed for functional PLT indirection on i386, it is removed as well. The PowerPC bug of calling the syscall directly in the setjmp/longjmp implementation is kept as is. Reported by: Pete French <petefrench@ingresso.co.uk> Tested by: Michiel Boland <boland37@xs4all.nl> Reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* - ANSIfydelphij2015-08-181-10/+5
| | | | | | | | | | | - Remove the redundant _PATH_RSH definition (paths.h at r96194); - Use pid_t for PIDs - Note that we are at the same level of OpenBSD's counterpart of revision 1.7 (r94757). No functional changes. MFC after: 2 weeks
* Fix name of a constant.tuexen2015-06-141-2/+2
| | | | MFC after: 3 days
* recv(),send(): Directly call interposing entry instead of going through PLT.jilles2015-05-102-2/+10
| | | | | | recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function.
* A complete user message is signalled with the MSG_EOR flag, not the MSG_EOFtuexen2015-04-231-3/+3
| | | | | | | flag. Thanks to Valentin Nechayev for reporting the issue. MFC after: 1 week
OpenPOWER on IntegriCloud