Eitan Adler
c6c4136a0a
libc/net: Fix some issues in inet6_opt_init() (from RFC 3542):
...
* The RFC says (in section 10.1) that only when extbuf is not NULL,
extlen shall be checked, so don't perform this check when NULL is
passed.
* socklen_t is unsigned, so checking extlen for less than zero is
not needed.
Submitted by: swildner@dragonflybsd.org
Reviewed by: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
Reviewed by: hrs
Obtained by: DragonFlyBSD
2014-02-04 03:01:33 +00:00
Michael Tuexen
1dd0c90501
Fix several bugs in sctp_bindx():
...
* Set errno to EAFNOSUPPORT if an address is provided which is neither
AF_INET nor AF_INET6.
* Don't modify the arguments.
* Don't smash the stack when provided with a non-zero port.
* Handle the case correctly where the first address provided is
an IPv6 address.
MFC after: 3 days
2014-01-04 11:39:59 +00:00
Michael Tuexen
10e6d832d5
Remove an unused variable and fix a memory leak in sctp_connectx().
...
Approved by: re (gjb)
MFC after: 3 days
2013-09-19 06:19:24 +00:00
Jilles Tjoelker
7253197882
libc: Use SOCK_CLOEXEC for various internal file descriptors.
...
This change avoids undesirably passing some internal file descriptors to a
process created (fork+exec) by another thread.
Kernel support for SOCK_CLOEXEC was added in r248534, March 19, 2013.
2013-09-06 21:02:06 +00:00
Jilles Tjoelker
a93705b06e
libc: Make various internal file descriptors from fopen() close-on-exec.
2013-08-23 13:59:47 +00:00
Pawel Jakub Dawidek
0237ec97ff
Consistently use 'af' as an argument name for address family.
...
Now both gethostbyname2(3) and gethostbyaddr(3) use the same argument name.
The same argument name is also used in implementations of those functions.
2013-08-18 10:38:59 +00:00
Michael Tuexen
b71f585303
Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
...
sctp_opt_info().
MFC after: 3 days
2013-07-09 19:12:47 +00:00
Michael Tuexen
7c9b649294
Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
...
sctp_opt_info().
MFC after: 3 days
2013-07-09 19:04:19 +00:00
Hiroki Sato
4e4f91b817
Update references.
2013-07-09 08:23:43 +00:00
Jilles Tjoelker
42cb36d269
Make recv() and send() cancellation points, as required by POSIX.
...
Call the recvfrom() and sendto() functions overridden by libthr instead of
the _recvfrom() and _sendto() versions that are not cancellation points.
2013-06-09 14:31:59 +00:00
Ed Maste
371df6c6ad
Switch to 2-clause license and standard text
...
Approved by: bms@
2013-06-06 21:09:27 +00:00
Joel Dahl
580dbd6574
mdoc: convert .Fd to .In, which is much nicer.
2013-06-04 07:37:06 +00:00
Ed Maste
acbbd07aca
Switch to 2-clause license
...
Approved by: bms@
2013-06-03 12:43:09 +00:00
Ed Maste
9eafd63574
Remove clause 3 and 4 from TNF licenses
...
Per the NetBSD Foundation statement
Third parties are encouraged to change the license on any files which
have a 4-clause license contributed to the NetBSD Foundation to a
2-clause license.
2013-05-29 01:54:10 +00:00
Ed Maste
e2e9c35fa4
Remove the advertising clause from the Regents of the University of
...
California's license, per the letter dated July 22, 1999.
2013-05-28 21:05:06 +00:00
Ed Maste
921ca2fd11
Remove the advertising clause from the Regents of the University of
...
California's license, per the letter dated July 22, 1999.
2013-05-28 20:37:48 +00:00
Ed Schouten
8ed7462feb
Update manpages for r250887.
...
Remove the lists of unneeded header files.
Requested by: eadler
2013-05-21 21:39:18 +00:00
Jung-uk Kim
a7880d59c9
Improve compatibility with recent flex from flex.sourceforge.net.
2013-05-03 23:51:32 +00:00
Michael Tuexen
7f15a8dff2
Remove the number of addresses restriction from sctp_connectx().
...
Remove unused code.
While there, do some cleanup of the code.
MFC after: 1 week
2013-04-10 11:26:30 +00:00
Jilles Tjoelker
37aafc3318
libc: Avoid SIGPIPE when nscd closes the connection unexpectedly.
...
It is almost always a bug if nscd closes the connection unexpectedly but
programs should not be killed with SIGPIPE for it.
Reviewed by: bushman
Tested by: Jan Beich
MFC after: 1 week
2013-03-13 18:38:18 +00:00
Niclas Zeising
d3087c8fe0
Change examples to be consistent with what style(9) says.
...
Approved by: joel (mentor)
MFC After: 2 weeks
2013-02-14 21:29:55 +00:00
Michael Tuexen
4224e03ae7
Improve code style. No functional change.
...
MFC after: 3 days
2013-02-10 19:21:17 +00:00
Hajimu UMEMOTO
f09c52c333
Re-enable ip6addrctl support but only for IPv6 address.
...
Requested by: Ben Morrow <ben__at__morrow.me.uk>
MFC after: 1 week
2013-01-10 14:08:19 +00:00
Hajimu UMEMOTO
d38f4ead6f
Disable destination address selection support of
...
getipnodebyname(1). RFC 2553 mentions IPv6 addresses
are returned 1st.
Spotted by: uqs
MFC after: 1 week
2013-01-09 15:22:37 +00:00
Michael Tuexen
9340982291
Cleanup the code a bit, which improves the portability.
...
MFC after: 1 week
2012-11-19 19:26:19 +00:00
Michael Tuexen
d51b57018e
Fix the handling of mapped IPv6 addresses in sctp_connectx().
...
MFC after: 3 days
2012-11-19 19:19:04 +00:00
Kevin Lo
5744601120
- the preferred way to write a NULL pointer constant is with NULL
...
- whitespace nit
Reviewed by: glebius
2012-11-16 15:02:35 +00:00
Michael Tuexen
4ed0ebf649
Fix errno in a couple of error cases.
...
MFC after: 3 days
2012-11-03 13:22:25 +00:00
Eitan Adler
db702c59cf
remove duplicate semicolons where possible.
...
Approved by: cperciva
MFC after: 1 week
2012-10-22 03:00:37 +00:00
Maksim Yevmenkin
0c19b5de29
Return zero from get_addrselectpolicy() when no source-address-selection
...
policy is installed.
MFC after: 1 week
2012-07-18 15:52:09 +00:00
Jilles Tjoelker
2bd56eacf8
libc: Remove some unused strings from getaddrinfo().
2012-07-15 20:39:21 +00:00
David E. O'Brien
d91d816266
Be explicit about the dependency on nsparser.h.
2012-06-21 15:47:06 +00:00
Dimitry Andric
f61ac9d9bd
Fix two warnings about self-assignment in libc. These normally only
...
trigger with clang, when you either use -save-temps, or ccache.
Reported by: Sevan / Venture37 <venture37@gmail.com>
MFC after: 3 days
2012-06-06 21:16:26 +00:00
Michael Tuexen
43dc9e2f41
Update copyright date.
...
MFC after: 3 days
2012-05-23 10:35:40 +00:00
Kevin Lo
d52995b6cf
Add missing header needed by free()
...
Reported by: tinderbox
2012-05-22 01:28:32 +00:00
Marcel Moolenaar
cf0d539f8b
Use the LLINDEX macro to access the link-level I/F index. This makes
...
it possible to work with a different type for the sdl_index field --
it only requires a recompile.
Obtained from: Juniper Networks, Inc.
2012-05-19 02:39:43 +00:00
Joel Dahl
67783ce453
mdoc: avoid unterminated quoted strings.
2012-05-13 14:28:00 +00:00
Glen Barber
a3fb6da9ba
General mdoc(7) and typo fixes.
...
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
2012-05-11 20:06:46 +00:00
Michael Tuexen
ff9452e199
Remove debug output.
...
MFC after: 3 days
2012-05-04 10:26:50 +00:00
Michael Tuexen
a1cd9c816d
Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by
...
Konstantin Belousov.
MFC after: 1 week.
X-MFC with: r234715
2012-04-26 19:56:06 +00:00
Michael Tuexen
0273a6a333
Export symbols for sctp_sendv() and sctp_recvv().
...
MFC after: 1 week
2012-04-26 19:31:16 +00:00
Eitan Adler
e44d947d5a
When searching for uninitialized memory usage add ensure that the entire
...
struct is set to zero.
PR: bin/166483
Submitted by: Roy Marples <roy@marples.name>
Reviewed by: delphij
Approved by: cperciva
MFC after: 3 days
2012-04-15 23:56:03 +00:00
Xin LI
32ffd2336c
Eliminate two cases of unwanted strncpy(). The name is not required
...
by the current code, and the results would get overwritten anyway
by subsequent memset().
Reviewed by: ume
MFC after: 1 month
2012-04-02 07:42:17 +00:00
Eitan Adler
50d675f7a9
Remove trailing whitespace per mdoc lint warning
...
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
2012-03-29 05:02:12 +00:00
Joel Dahl
478c2636bb
Minor indentation and paragraph nits.
2012-03-27 20:39:49 +00:00
Joel Dahl
46355096e1
mdoc: correct .Bd/.Bl arguments.
...
Reviewed by: brueffer
2012-03-26 21:22:53 +00:00
Joel Dahl
41949a1ed5
Remove superfluous paragraph macro.
2012-03-25 12:13:24 +00:00
Eitan Adler
6210106152
draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007
...
PR: docs/163771
Submitted by: phk
Reviewed by: If someone else reviewed your modification.
Approved by: cperciva
MFC after: 1 week
2012-03-19 00:47:01 +00:00
Ed Schouten
6b99842ada
Globally replace u_int*_t from (non-contributed) man pages.
...
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.
I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.
MFC after: 1 month
2012-02-12 18:29:56 +00:00
Bjoern A. Zeeb
ca1672da93
Switch getifaddrs(3) to the new API introduced in r231505. Also remove
...
conditional code parts not used by or applicable to FreeBSD.
The new implementation is supposed to be able to cope with changes to
the 'l' versions of the msghdr structs now used as well as to if_data
allowing future changes without breaking things.
This restores carp(4) config support in HEAD after r231504.
Reviewed by: glebius, brooks
MFC After: 3 months
2012-02-11 06:05:40 +00:00