#
63f28490 |
| 13-Jan-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ng_ksocket: fix build without INET6
Fixes: 9234a50752cd47887849d4665af0f9f4abdefb5d
|
#
9234a507 |
| 10-Jan-2025 |
Seyed Pouria Mousavizadeh Tehrani <info@spmzt.net> |
ng_ksocket: add IPv6 support for address parsing and unparsing
Differential Revision: https://reviews.freebsd.org/D48204
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0 |
|
#
1a3d1be4 |
| 23-Mar-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ng_ksocket: use new macros to lock socket buffers
|
Revision tags: release/13.3.0 |
|
#
f79a8585 |
| 30-Jan-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
sockets: garbage collect SS_ISCONFIRMING
Fixes: 8df32b19dee92b5eaa4b488ae78dca6accfcb38e
|
#
0fac350c |
| 30-Nov-2023 |
Gleb Smirnoff <glebius@FreeBSD.org> |
sockets: don't malloc/free sockaddr memory on getpeername/getsockname
Just like it was done for accept(2) in cfb1e92912b4, use same approach for two simplier syscalls that return socket addresses.
sockets: don't malloc/free sockaddr memory on getpeername/getsockname
Just like it was done for accept(2) in cfb1e92912b4, use same approach for two simplier syscalls that return socket addresses. Although, these two syscalls aren't performance critical, this change generalizes some code between 3 syscalls trimming code size.
Following example of accept(2), provide VNET-aware and INVARIANT-checking wrappers sopeeraddr() and sosockaddr() around protosw methods.
Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D42694
show more ...
|
#
cfb1e929 |
| 30-Nov-2023 |
Gleb Smirnoff <glebius@FreeBSD.org> |
sockets: don't malloc/free sockaddr memory on accept(2)
Let the accept functions provide stack memory for protocols to fill it in. Generic code should provide sockaddr_storage, specialized code may
sockets: don't malloc/free sockaddr memory on accept(2)
Let the accept functions provide stack memory for protocols to fill it in. Generic code should provide sockaddr_storage, specialized code may provide smaller structure.
While rewriting accept(2) make 'addrlen' a true in/out parameter, reporting required length in case if provided length was insufficient. Our manual page accept(2) and POSIX don't explicitly require that, but one can read the text as they do. Linux also does that. Update tests accordingly.
Reviewed by: rscheff, tuexen, zlei, dchagin Differential Revision: https://reviews.freebsd.org/D42635
show more ...
|
#
43f7e216 |
| 17-Nov-2023 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ng_ksocket: fix accept(2)
- Provide listen upcall and set it on NGM_KSOCKET_LISTEN - Mask EWOULDBLOCK on NGM_KSOCKET_ACCEPT
Reviewed by: afedorov Differential Revision: https://reviews.freebsd.org
ng_ksocket: fix accept(2)
- Provide listen upcall and set it on NGM_KSOCKET_LISTEN - Mask EWOULDBLOCK on NGM_KSOCKET_ACCEPT
Reviewed by: afedorov Differential Revision: https://reviews.freebsd.org/D42637 PR: 272319 PR: 275106 Fixes: 779f106aa169256b7010a1d8f963ff656b881e92
show more ...
|
#
efad7cbf |
| 17-Nov-2023 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ng_ksocket: fix upcall clearing on node shutdown
Note: imho, the proper solution would be to guarantee that upcalls won't ever be called after soclose(), but this isn't the case, yet. This change at
ng_ksocket: fix upcall clearing on node shutdown
Note: imho, the proper solution would be to guarantee that upcalls won't ever be called after soclose(), but this isn't the case, yet. This change at least makes the node work the way it always worked.
Reviewed by: afedorov Differential Revision: https://reviews.freebsd.org/D42636 PR: 272319 PR: 275106 Fixes: 779f106aa169256b7010a1d8f963ff656b881e92
show more ...
|
Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
8624f434 |
| 31-Aug-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4. It is a socket to intercept packets from ipfw(4) to userland and re-inject them back. It can dive
divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4. It is a socket to intercept packets from ipfw(4) to userland and re-inject them back. It can divert and re-inject IPv4 and IPv6 packets today, but potentially it is not limited to these two protocols. The IPPROTO_DIVERT does not belong to known IP protocols, it doesn't even fit into u_char. I guess, the implementation of divert(4) was done the way it is done basically because it was easier to do it this way, back when protocols for sockets were intertwined with IP protocols and domains were statically compiled in.
Moving divert(4) out of inetsw accomplished two important things:
1) IPDIVERT is getting much closer to be not dependent on INET. This will be finalized in following changes. 2) Now divert socket no longer aliases with raw IPv4 socket. Domain/proto selection code won't need a hack for SOCK_RAW and multiple entries in inetsw implementing different flavors of raw socket can merge into one without requirement of raw IPv4 being the last member of dom_protosw.
Differential revision: https://reviews.freebsd.org/D36379
show more ...
|
#
e7d02be1 |
| 17-Aug-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
protosw: refactor protosw and domain static declaration and load
o Assert that every protosw has pr_attach. Now this structure is only for socket protocols declarations and nothing else. o Merge
protosw: refactor protosw and domain static declaration and load
o Assert that every protosw has pr_attach. Now this structure is only for socket protocols declarations and nothing else. o Merge struct pr_usrreqs into struct protosw. This was suggested in 1996 by wollman@ (see 7b187005d18ef), and later reiterated in 2006 by rwatson@ (see 6fbb9cf860dcd). o Make struct domain hold a variable sized array of protosw pointers. For most protocols these pointers are initialized statically. Those domains that may have loadable protocols have spacers. IPv4 and IPv6 have 8 spacers each (andre@ dff3237ee54ea). o For inetsw and inet6sw leave a comment noting that many protosw entries very likely are dead code. o Refactor pf_proto_[un]register() into protosw_[un]register(). o Isolate pr_*_notsupp() methods into uipc_domain.c
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D36232
show more ...
|
Revision tags: release/13.1.0 |
|
#
497c2cf4 |
| 08-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
ng_ksocket: Remove unused variable.
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0 |
|
#
662c1305 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0 |
|
#
4198293b |
| 17-Jun-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r319801 through r320041.
|
#
7737de95 |
| 14-Jun-2017 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Check return value from soaccept().
Coverity: 1376209
|
#
686fb94a |
| 10-Jun-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r319548 through r319778.
|
#
779f106a |
| 08-Jun-2017 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Listening sockets improvements.
o Separate fields of struct socket that belong to listening from fields that belong to normal dataflow, and unionize them. This shrinks the structure a bit. -
Listening sockets improvements.
o Separate fields of struct socket that belong to listening from fields that belong to normal dataflow, and unionize them. This shrinks the structure a bit. - Take out selinfo's from the socket buffers into the socket. The first reason is to support braindamaged scenario when a socket is added to kevent(2) and then listen(2) is cast on it. The second reason is that there is future plan to make socket buffers pluggable, so that for a dataflow socket a socket buffer can be changed, and in this case we also want to keep same selinfos through the lifetime of a socket. - Remove struct struct so_accf. Since now listening stuff no longer affects struct socket size, just move its fields into listening part of the union. - Provide sol_upcall field and enforce that so_upcall_set() may be called only on a dataflow socket, which has buffers, and for listening sockets provide solisten_upcall_set().
o Remove ACCEPT_LOCK() global. - Add a mutex to socket, to be used instead of socket buffer lock to lock fields of struct socket that don't belong to a socket buffer. - Allow to acquire two socket locks, but the first one must belong to a listening socket. - Make soref()/sorele() to use atomic(9). This allows in some situations to do soref() without owning socket lock. There is place for improvement here, it is possible to make sorele() also to lock optionally. - Most protocols aren't touched by this change, except UNIX local sockets. See below for more information.
o Reduce copy-and-paste in kernel modules that accept connections from listening sockets: provide function solisten_dequeue(), and use it in the following modules: ctl(4), iscsi(4), ng_btsocket(4), ng_ksocket(4), infiniband, rpc.
o UNIX local sockets. - Removal of ACCEPT_LOCK() global uncovered several races in the UNIX local sockets. Most races exist around spawning a new socket, when we are connecting to a local listening socket. To cover them, we need to hold locks on both PCBs when spawning a third one. This means holding them across sonewconn(). This creates a LOR between pcb locks and unp_list_lock. - To fix the new LOR, abandon the global unp_list_lock in favor of global unp_link_lock. Indeed, separating these two locks didn't provide us any extra parralelism in the UNIX sockets. - Now call into uipc_attach() may happen with unp_link_lock hold if, we are accepting, or without unp_link_lock in case if we are just creating a socket. - Another problem in UNIX sockets is that uipc_close() basicly did nothing for a listening socket. The vnode remained opened for connections. This is fixed by removing vnode in uipc_close(). Maybe the right way would be to do it for all sockets (not only listening), simply move the vnode teardown from uipc_detach() to uipc_close()?
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D9770
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
053359b7 |
| 29-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/netgraph: spelling fixes in comments.
No functional change.
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0 |
|
#
6cec9cad |
| 03-Jun-2014 |
Peter Grehan <grehan@FreeBSD.org> |
MFC @ r266724
An SVM update will follow this.
|
#
3b8f0845 |
| 28-Apr-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head
|
#
84e51a1b |
| 23-Apr-2014 |
Alan Somers <asomers@FreeBSD.org> |
IFC @264767
|
#
1709ccf9 |
| 29-Mar-2014 |
Martin Matuska <mm@FreeBSD.org> |
Merge head up to r263906.
|
#
45c203fc |
| 14-Mar-2014 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove AppleTalk support.
AppleTalk was a network transport protocol for Apple Macintosh devices in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was a legacy protocol and primary n
Remove AppleTalk support.
AppleTalk was a network transport protocol for Apple Macintosh devices in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was a legacy protocol and primary networking protocol is TCP/IP. The last Mac OS X release to support AppleTalk happened in 2009. The same year routing equipment vendors (namely Cisco) end their support.
Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE.
show more ...
|
#
2c284d93 |
| 14-Mar-2014 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating system from late 80s and then 90s. The NetWare itself switched to TCP/IP as default transport in 1998.
Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating system from late 80s and then 90s. The NetWare itself switched to TCP/IP as default transport in 1998. Later, in this century the Novell Open Enterprise Server became successor of Novell NetWare. The last release that claimed to still support IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco) discontinued support for IPX in 2011.
Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
show more ...
|
#
5748b897 |
| 19-Feb-2014 |
Martin Matuska <mm@FreeBSD.org> |
Merge head up to r262222 (last merge was incomplete).
|