summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Stop including if_var.h from userland.glebius2015-04-062-2/+0
| | | | Sponsored by: Nginx, Inc.
* Add an SCTP symbol which was missed intuexen2015-03-281-0/+1
| | | | | | | | | https://svnweb.freebsd.org/base?view=revision&revision=169622 This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783 Thanks to Jukka Ukkonen for reporting the bug and providing a fix. MFC after: 3 days
* Add a SCTP socket option to limit the cwnd for each path.tuexen2015-03-101-0/+3
| | | | MFC after: 1 month
* eui64_line(): plug memory leak.pfg2015-02-271-0/+1
| | | | | | CID: 978412 Reviewed by: brooks, delphij CodeReview: https://reviews.freebsd.org/D1976
* Hint out check for unsigned negative values.pfg2015-02-271-1/+1
| | | | | | | | | | | | | | | On FreeBSD socklen_t is unsigned so the check negative len in inet6_opt_append() is redundant and likely to be optimized away by the compiler. On other operating systems this is not necessarily so, and in the future we may want to sign it so leave the check in but place it in a secondary position as a subtle indication that the bogus check is intentional. Discussed with: rpaulo CID: 1017783
* Various mdoc fixes and a few EOL whitespace removals.brueffer2014-12-213-5/+5
| | | | Found with: mandoc -Tlint
* Initilize the msg_flags field consistently in all code paths.tuexen2014-12-171-1/+4
| | | | | Reported by: Coverity CID: 1018726
* Fix a typo reported by Lennart Grahl.tuexen2014-12-101-1/+1
| | | | MFC after: 3 days
* ANSIfy b64_ptonemaste2014-11-271-4/+1
|
* Fix b64_pton output buffer overrun test for exact-sized bufferemaste2014-11-251-7/+15
| | | | | | | | | | | | b64_pton would sometimes erroneously fail to decode a base64 string into a precisely sized buffer. The overflow check was a little too greedy. Reported by: Ted Unangst on freebsd-hackers@ Reviewed by: loos, trasz Obtained from: OpenBSD MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1218
* Fix ifa_data description.pluknet2014-11-251-12/+10
| | | | | | | PR: 176583 Discussed with: glebius MFC after: 1 week Sponsored by: Nginx, Inc.
* The fallback flag in nsdispatch prevents the fallback implementation ofdes2014-11-251-9/+16
| | | | | | | | | | | | | | getgroupmembership() from invoking the correct backend in the compat case. Replace it with a nesting depth counter so it only blocks one level (the first is the group -> group_compat translation, the second is the actual backend). This is one of two bugs that break getgrouplist() in the compat case, the second being that the backend's own getgroupmembership() method is ignored. Unfortunately, that is not easily fixable without a redesign of our nss implementation (which is also needed to implement the +@group syntax in /etc/passwd). PR: 190055 MFC after: 1 week
* Renove faith(4) and faithd(8) from base. It looks like industrymelifaro2014-11-092-53/+0
| | | | | | | | | have chosen different (and more traditional) stateless/statuful NAT64 as translation mechanism. Last non-trivial commits to both faith(4) and faithd(8) happened more than 12 years ago, so I assume it is time to drop RFC3142 in FreeBSD. No objections from: net@
* Eliminate conf_lock and instead rely on the NSS write lock to protectmarkj2014-10-241-8/+5
| | | | | | | | | | | | | | | NSS configuration state. As a side effect, this fixes a race condition which can occur if multiple threads call nsdispatch(3) concurrently before nsswitch.conf has been parsed. Previously, the thread holding conf_lock could cause other threads to return from nss_configure() before nsswitch.conf had been parsed, forcing them to fall back to the default sources for their NSS methods. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D994 MFC after: 1 month Sponsored by: EMC / Isilon Storage Division
* Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUStuexen2014-08-131-0/+6
| | | | | | | | | socket options. This includes managing the correspoing stat counters. Add the SCTP_DETAILED_STR_STATS kernel option to control per policy counters on every stream. The default is off and only an aggregated counter is available. This is sufficient for the RTCWeb usecase. MFC after: 1 week
* Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTEDtuexen2014-08-121-0/+7
| | | | | | socket options. Add also a sysctl to control the support of ASCONF. MFC after: 1 week
* Const-ify character stringpfg2014-08-071-1/+1
| | | | | Obtained from: Apple Inc. (Libc 997.90.3) MFC after: 3 days
* Add support for the SCTP_RECONFIG_SUPPORTED and the correspondingtuexen2014-08-041-0/+3
| | | | | | sysctl controlling the negotiation of the RE-CONFIG extension. MFC after: 3 days
* Add support for the SCTP_PKTDROP_SUPPORTED socket option andtuexen2014-08-031-0/+3
| | | | | | | the corresponding sysctl variable. The default is off, since the specification is not an RFC yet. MFC after: 1 week
* Add SCTP socket option SCTP_NRSACK_SUPPORTED to control thetuexen2014-08-031-0/+3
| | | | | | | | NRSACK extension. The default will still be off, since it it not an RFC (yet). Changing the sysctl name will be in a separate commit. MFC after: 1 week
* Add support for the SCTP_PR_SUPPORTED socket option as specified intuexen2014-08-021-0/+3
| | | | | | | http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies Add also a sysctl controlling the default of the end-points. MFC after: 1 week
* Cleanup the ECN configuration handling and provide an SCTP sockettuexen2014-08-021-0/+3
| | | | | | | option for controlling ECN on future associations and get the status on current associations. A simialar pattern will be used for controlling SCTP extensions in upcoming commits.
* Clean r268867.pfg2014-07-191-1/+1
| | | | Proposed by: bde
* Use unsigned optlen in getsourcefilter()pfg2014-07-191-1/+2
| | | | | | | | Sizes can not be negative and the functions that use it expect an unsigned value anyways. Obtained from: Apple (Libc-997.90.3) MFC after: 1 week
* Make generation of nslexer.c more robust.jmmv2014-07-141-3/+5
| | | | | | | | | | | | | | | | | | Ensure that lex errors fail the build instead of being silently ignored due to the piped call. Also postpone the update of the nslexer.c file until we are sure we have generated it properly. These changes fix some very obscure build failures I encountered while building FreeBSD within a chroot that did not have devfs mounted. The specific errors looked like: .../libc.so.7: undefined reference to `_nsyyerror' .../libc.so.7: undefined reference to `_nsyyin' .../libc.so.7: undefined reference to `_nsyylex' .../libc.so.7: undefined reference to `_nsyylineno' .../libc.so.7: undefined reference to `_nsyytext' and were caused due to a mangled nslexer.c being linked into libc.
* Fix build with WITHOUT_INET6.ume2014-06-261-0/+2
| | | | | Spotted by: bf MFC after: 1 week
* - Exclude loopback address rather than loopback interface.ume2014-06-261-13/+27
| | | | | | | | | | | - style(9) TODO: When AI_ADDRCONFIG is specified, getaddrinfo() can be quite slow for system with many interfaces. We should have some kernel sysctls to report IPv4/IPv6 status. Spotted by: melifaro MFC after: 1 week
* Exclude IPv4 address from doing longest match.ume2014-06-231-1/+2
| | | | | | It prevented DNS based load balancing. MFC after: 1 week
* use .Mt to mark up email addresses consistently (part4)bapt2014-06-232-4/+2
| | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* Use SOCK_CLOEXEC.ume2014-06-191-1/+1
| | | | MFC after: 1 week
OpenPOWER on IntegriCloud