summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
Commit message (Collapse)AuthorAgeFilesLines
* Put giant locks due to make getaddrinfo(), getnameinfo()ume2002-10-062-1/+41
| | | | | | | | | | and getipnodeby*() thread-safe. Our res_*() is not thread-safe. So, we share lock between getaddrinfo() and getipnodeby*(). Still, we cannot use getaddrinfo() and getipnodeby*() in conjunction with other functions which call res_*(). Requested by: many people
* Allocate 64K recieve buffer for DNS responses.ume2002-10-032-26/+50
| | | | | Though res_query.c also defines and refers MAXPACKET, it is not related to ansbuf. So, I didn't touch res_query.c.
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-251-2/+3
|
* Add forgotten newlines in debug messages.nectar2002-09-191-2/+2
|
* Allocate 64K recieve buffer for DNS responses.ume2002-09-161-27/+48
|
* Allocate 64K recieve buffer for DNS responses.ume2002-09-151-20/+45
| | | | | | | | KAME did the modification only to _dns_getaddrinfo(). However, it is not sufficient, and res_queryN() should be modified, too. So, I did same modification to res_queryN(). Obtained from: KAME
* Check for truncation in calls to res_send/res_query/res_search.nectar2002-09-156-12/+42
| | | | Fail when it is detected.
* Backout the increase of MAXPACKET from 1024 to 65536: itnectar2002-09-156-7/+26
| | | | | | broke pthreads. Reported by: mbr, tjr
* Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.ume2002-09-141-0/+2
| | | | Obtained from: KAME
* When using res_send/res_query/res_search, the caller must eithernectar2002-09-136-26/+7
| | | | | | | | | insure enough space is available for the response, or be prepared to resize the buffer and retry as necessary. Do the conservative thing and make sure enough space is available. Reviewed by: silence on freebsd-audit
* Style: One space between "restrict" qualifier and "*".tjr2002-09-063-5/+5
|
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-252-2/+2
|
* Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attemptsjdp2002-08-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | to fail needlessly if a reverse DNS lookup of the IP address didn't come up with a hostname. As a comment in the code clearly stated, the "damn hostname" was looked up only for the purpose of netgroup matching. But if that lookup failed, the function bailed out immediately even though in many cases netgroup matching would not be used. This change marks the hostname as unknown but continues. Where netgroup matching is performed, an unknown hostname is handled conservatively. I.e., for "+@netgroup" (accept) entries an unknown hostname never matches, and for "-@netgroup" (reject) entries an unknown hostname always matches. In the lines affected (only), I also fixed a few bogus casts. There are others, and in fact this entire file would be a good candidate for a cleanup sweep. Reviewed by: imp (wearing his flourescent yellow Security Team cap) MFC after: 2 days
* Fixed getaddrinfo to honor sortlist in /etc/resolv.confpirzyk2002-08-211-0/+82
| | | | | | | PR: bin/27939 Reviewed by: ru, sheldonh (about a year ago) Obtained from: ume (via KAME, I think) MFC after: 1 month
* - Fix a bug that wrote one char behind the end of therobert2002-08-151-6/+3
| | | | | | | | | | | | | | supplied buffer in case the size of it was equal to the number of characters the converted address consumed. The bug occurred when converting an AF_INET address. - Remove the SPRINTF macro and use sprintf instead. - Do not do string formatting using sprintf(3) and a temporary buffer which is copied when the supplied buffer provides enough space. Instead, use snprintf(3) and the real destination buffer, thus avoid the copy. Reported by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1) PR: misc/41289
* Put each function argument on its own line to keep lines shorterrobert2002-08-151-1/+6
| | | | than 80 columns.
* -Add the restrict required by IEEE Std 1003.1-2001 in formrobert2002-08-143-25/+9
| | | | | | | of our __restrict macro to the prototypes and function definitions of inet_pton and inet_ntop. - Use ANSI-C function argument lists. - Adjust the prototypes in the manual page.
* mdoc(7) police: laundry.ru2002-08-091-22/+37
|
* Remove an #include <syslog.h>. It's already included conditionallymux2002-08-021-1/+0
| | | | | | above, as it should be. Submitted by: Olivier Houchard <cognet@ci0.org>
* sysctl(NET_RT_IFLIST) up to several (currently 5) times.ume2002-07-251-8/+29
| | | | | | | | This will make the behavior robuster if many addresses are added after the size estimation of storage at the first sysctl. Reviewed by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> MFC after: 1 week
* - ntohs() returns unsigned value.ume2002-07-241-59/+56
| | | | | | | | | | | | | - use strlcpy. - snprintf can return negative value, so cope with it. - tweak interface index on interface locals (ff01::/16). - removed unused macros. - removed a macro that uses only once (in a trivial context). - explicitly say goodbye to ENI_xxx. - constify struct afd. Obtained from: KAME MFC after: 1 week
* Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex()ume2002-07-156-328/+403
| | | | | | | and if_freenameindex(). Obtained from: KAME MFC after: 2 weeks
* Fix syntax error which occurred when LIBC_SCCS was defined.robert2002-07-071-1/+1
|
* Make NI_WITHSCOPEID a default (always on), to synchronizeume2002-07-021-30/+20
| | | | | | | with recent 2553bis. Obtained from: KAME MFC after: 3 weeks
* Remove two lines that were cvs merged that shouldn't have been. Thisimp2002-06-261-2/+0
| | | | | | fixes the build. Reported by: dillon.
* Remove two stray lines that snuck in the cvs mergeimp2002-06-262-2/+0
|
* Initialize a pointer that was left uninitialized with the previousnectar2002-06-261-0/+1
| | | | commit.
* Include more robust checking of end of buffer that more completelyimp2002-06-264-52/+32
| | | | plugs the hole.
* Don't allow buffer overflow here either.imp2002-06-261-1/+3
|
* Fix a minor last, minute issue that came in after I committed.imp2002-06-261-1/+1
| | | | Noticed by: nectar
* Avoid remote buffer overflow on hostbuf[].imp2002-06-262-1/+4
| | | | Submitted by: joost Pol <joost@pine.nl>
* Correct FreeBSD release of first appearance in the HISTORY sectionsheldonh2002-06-061-1/+1
| | | | (5.0 -> 4.6).
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-281-14/+0
| | | | Submitted by: keramida
* Document that <netinet/in.h> can also provide prototypes. Changemike2002-05-111-2/+6
| | | | wording related to standards conformance.
* just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.suz2002-04-196-11/+22
| | | | | | | (based on freebsd4-snap-20020128) Reviewed by: ume MFC after: 1 week
* Add awareness of an IPv6.ume2002-04-151-7/+20
| | | | MFC after: 1 week
* Quoting log message for OpenBSD rev 1.7:nectar2002-04-151-0/+28
| | | | | | ``Tack on MagniComp (BSD) license since this originally came from rdist.'' Obtained from: OpenBSD
* Fix style of ether_ntoa().ru2002-04-081-3/+3
|
* Polish previous revision.ru2002-04-061-1/+1
|
* Fix ether_ntoa() to generate the %02x format people expect, instead of %x,dillon2002-04-061-2/+3
| | | | | | for the ethernet address. MFC after: 1 day
* When _kevent() returns with errno = EINTR and timeout is notume2002-04-011-4/+3
| | | | | | exceeded, it should be falldown to next_ns. MFC after: 1 week
* Fix the style of the SCM ID's.obrien2002-03-221-0/+2
| | | | I believe have made all of libc .h's as consistent as possible.
* Fix the style of the SCM ID's.obrien2002-03-2254-107/+116
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove multi-line __P() usage.obrien2002-03-227-35/+30
|
* Remove __P() usage.obrien2002-03-2112-39/+39
|
* Remove 'register' keyword.obrien2002-03-2129-84/+98
|
* Remove trailing characters from #endif.obrien2002-03-151-3/+0
| | | | Actually this #endif is not needed, so remove leading characters also.
* Add a carriage return to each function declaration, and make use of ID tageric2002-03-061-8/+12
| | | | | | macros. MFC after: 1 day
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-183-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* balance parens.alfred2002-02-051-1/+1
| | | | Submitted by: mbr
OpenPOWER on IntegriCloud