summaryrefslogtreecommitdiff
path: root/src/lib/libc/net (follow)
Commit message (Collapse)AuthorAgeFilesLines
* typo in comment; Effectivly -> Effectively; ok gilles@op2024-09-031-2/+2
|
* wild white spacederaadt2024-09-031-2/+2
|
* A dozen interfaces in <endian.h> were standardized in POSIX-2024 as expectedguenther2024-08-031-6/+4
|
* drop htonl(), htons(), ntohl(), ntohs() MD functions from libcnaddy2024-04-155-50/+21
| | | | | | | | | | | Userland code compiled in a normal fashion picks up the htonl(), htons(), ntohl(), ntohs() macros implemented by endian.h. The functions in libc are effectively unused. Keep the MI functions in case something looks for the symbols in libc or plays games with #undef, but change them to wrap the implementation from endian.h. tweaks suggested by claudio@, ok miod@
* POSIX defines inet_ntoa, not inet_aton.bentley2024-03-061-3/+3
| | | | ok deraadt@ jmc@
* Last arg is also a pointer, so pass NULL instead of 0; ok deraadt@otto2023-03-251-2/+2
|
* Fix a number of out of bound reads in DNS response parsing.millert2023-03-151-1/+7
| | | | Originally from djm@. OK deraadt@ florian@ bluhm@
* spelling fixes; from paul tagliamontejmc2022-12-275-9/+9
| | | | | any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
* tolower(3) guarantees to return its argument unchanged if it's notflorian2022-11-161-10/+3
| | | | | | | uppercase. While here use the correct idiom of casting to unsigned char. OK millert, farewell to ultrix deraadt
* .Li -> .Vt where appropriate;jmc2022-09-119-55/+52
| | | | | | from josiah frentsos, tweaked by schwarze ok schwarze
* Fix typo in last commit.millert2022-04-131-2/+2
|
* inet_net_pton_ipv6: avoid signed vs unsigned comparisonmillert2022-04-131-3/+5
| | | | | | | Use a temporary variable to store the number of bytes to be copied (size_t) and also use it as the memcpy(3) length. Previously we copied "size" bytes instead of just the necessary number. OK claudio@ tb@
* man pages: add missing commas between subordinate and main clausesnaddy2022-03-314-17/+17
| | | | | | | jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
* man pages: add missing word, The foo() ... -> The foo() function ...naddy2022-03-293-9/+9
| | | | ok jmc@ schwarze@
* A few sys/param.h annotations lacked ALIGNBYTESderaadt2021-11-291-2/+2
|
* Describe what RES_USE_DNSSEC does and how it's affected by trust-adjca2021-11-241-2/+15
| | | | ok florian@
* Implement rfc6840 (AD flag processing) if using trusted name serversjca2021-11-221-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | libc can't do DNSSEC validation but it can ask a "security-aware" resolver to do so. Let's send queries with the AD flag set when appropriate, and let applications look at the AD flag in responses in a safe way, ie clear the AD flag if the resolvers aren't trusted. By default we only trust resolvers if resolv.conf(5) only lists name servers on localhost - the obvious candidates being unwind(8) and unbound(8). For non-localhost resolvers, an admin who trusts *all the name servers* listed in resolv.conf(5) *and the network path leading to them* can annotate this with "options trust-ad". AD flag processing gives ssh -o VerifyHostkeyDNS=Yes a chance to fetch SSHFP records in a secure manner, and tightens the situation for other applications, eg those using RES_USE_DNSSEC for DANE. It should be noted that postfix currently assumes trusted name servers by default and forces RES_TRUSTAD if available. RES_TRUSTAD and "options trust-ad" were first introduced in glibc by Florian Weimer. Florian Obser (florian@) contributed various improvements, fixed a bug and added automatic trust for name servers on localhost. ok florian@ phessler@
* Revert accidental change.jca2021-10-251-1/+2
| | | | Dunno why this ended up here, cvs is always full of surprises.
* Make brk() and sbrk() weak again as intended.jca2021-10-251-2/+1
| | | | | | Apparently spotted by mortimer@ while working on clang 13 and amd64. No actual change on sparc64 as this architecture still uses ld.bfd. ok kettenis@
* ansijsg2021-10-241-10/+4
| | | | ok mpi@ deraadt@
* Put back sys/types.h and sys/socket.h. The latter was unintentionallytb2021-10-221-1/+3
| | | | removed and the former is still needed, as pointed out by kettenis
* Fix some ghastly whitespace. From Martin Vahlensiecktb2021-10-221-6/+6
|
* Use unsigned char instead of u_char in base64.c. This is a mildtb2021-10-221-9/+6
| | | | | | | | | portability annoyance since not all systems have u_char. Remove the now unused includes sys/types.h and stdio.h. u_char diff from Jonas Termansen ok deraadt
* does not need arpa/nameser.hderaadt2021-10-111-2/+1
|
* inet_ntop(3) needs sys/socket.h for AF_INET / AF_INET6 so add the headerclaudio2021-09-012-6/+5
| | | | | to the list. While here remove some of the headers from inet_net_ntop(3) for balance.
* Prevent an overflow in inet_net_pton(3) when the passed in buffer isflorian2021-01-191-11/+18
| | | | | | | | | | | | | | | | | too small in the AF_INET6 case. Spotted by Brad House (brad AT brad-house.com) with the c-ares regression test. The man page says Caution: The dst field should be zeroed before calling inet_net_pton() as the function will only fill the number of bytes necessary to encode the network number in network byte order. Which seems to suggest that the function should work if the passed in storage is big enough to hold the prefix, which might be smaller than sizeof(in6_addr). Input & OK tb
* Add support for timeconting in userland.pirofti2020-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* A comma is not appropriate here, use a semicolonjca2020-04-251-2/+2
| | | | Suggested by Evan Silberman, confirmed by jmc@
* Discourage use of RES_USE_INET6jca2020-04-251-1/+5
| | | | Suggested by eric@, input from deraadt@, ok deraadt@ eric@
* Fix RES_USE_INET6 descriptionjca2020-04-251-7/+9
| | | | | | | | | | The previous wording implied this option does nothing, which is wrong. This option does affect the way gethostbyname(3) works on OpenBSD (return IPv6 addresses if available). On some systems, it also introduces IPv4-mapped IPv6 addresses, a "feature" that we don't support. ok deraadt@ eric@
* delete wasteful ;;deraadt2020-01-221-2/+2
| | | | ok tedu
* mop up resolver.3 rename; ok deraadtjmc2019-08-305-15/+15
|
* mop up for inet_net rename; ok deraadtjmc2019-08-303-9/+9
|
* Move 4 manual pages from not-a-function filenames to a correct filename,deraadt2019-08-306-16/+16
| | | | | and correct Xr. ok jmc
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-2/+2
|
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-283-10/+10
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* sockatmark(3), recv(2), getsockopt(2), and connect(2) return specificallyderaadt2019-06-201-4/+4
| | | | | -1 to mark failure, not arbitrary values < 0. I believe manual pages should follow the described contract precisely and accurately.
* explicitly mention that RES_NOALIASES has no effect;schwarze2019-05-131-3/+4
| | | | | jmc@ noticed that the text wasn't completely clear; OK jmc@
* Xr the byteorder funcs; from tim kuijstenjmc2019-02-131-3/+4
|
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-251-3/+3
|
* There are cases where a program doing dns requests wants to set theotto2019-01-141-2/+4
| | | | | Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
* Remove ethers(5) YP support bits from libc as it makes it difficult tobrynet2018-11-092-70/+8
| | | | | | | | effectively use pledge(2) in some programs. approval from many, thanks! idea by & ok deraadt@
* Fix typo in RFC number.tb2018-05-101-2/+2
| | | | ok benno
* reference hosts(5) instead of networks(5)schwarze2018-04-281-3/+3
|
* Remove references to the obsolete getnetent(3) and networks(5).schwarze2018-04-282-10/+7
|
* Stop talking about /etc/networks, which is no longer used,schwarze2018-04-281-39/+38
| | | | | | and reference gethostby*(3) and /etc/hosts instead. Say that setnetent(3), getnetent(3), and endnetent(3) now do nothing. With feedback from guenther and significant help from deraadt@.
* Say that sethostent(3), gethostent(3), and endhostent(3) do nothing.schwarze2018-04-281-50/+19
| | | | | | While here, stop implying plans to support additional address families in the future, and do not call gethostbyname2(3) "advanced". OK deraadt@ guenther@
* To allow us to get rid of /etc/networks, make setnetent(3),schwarze2018-04-281-75/+4
| | | | | | getnetent(3), and endnetent(3) do nothing, just like sethostent(3), gethostent(3), and endhostent(3) years ago. OK deraadt@ guenther@
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-121-4/+4
|
* Add the missing STANDARDS section (kettenis@ noticed that these areschwarze2017-11-281-6/+14
| | | | | POSIX functions) and turn the weird DIAGNOSTICS section into a normal RETURN VALUES section while here.