| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a
socket buffer. The mutex in the receive buffer also protects the data
in struct socket.
o Determine the lock strategy for each members in struct socket.
o Lock down the following members:
- so_count
- so_options
- so_linger
- so_state
o Remove *_locked() socket APIs. Make the following socket APIs
touching the members above now require a locked socket:
- sodisconnect()
- soisconnected()
- soisconnecting()
- soisdisconnected()
- soisdisconnecting()
- sofree()
- soref()
- sorele()
- sorwakeup()
- sotryfree()
- sowakeup()
- sowwakeup()
Reviewed by: alfred
|
|
|
|
|
|
|
| |
This message is sent to the control socket when the SessionID
is established.
Approved by: archie (after a very cursory glance)
|
|
|
|
|
|
|
| |
This fixes panics with certain Ethernet drivers when doing bridging,
PPPoE, etc. before the driver has been fully brought up.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
Requested by: bde
Since locking sigio_lock is usually followed by calling pgsigio(),
move the declaration of sigio_lock and the definitions of SIGIO_*() to
sys/signalvar.h.
While I am here, sort include files alphabetically, where possible.
|
|
|
|
|
|
|
|
|
|
|
| |
exhausting the kernel timeout table. Perform the usual gymnastics to
avoid race conditions between node shutdown and timeouts occurring.
Also fix a bug in handling ack delays < PPTP_MIN_ACK_DELAY. Before,
we were ack'ing immediately. Instead, just impose a minimum ack delay
time, like the name of the macro implies.
MFC after: 1 week
|
|
|
|
|
|
|
| |
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
|
|
|
|
|
|
|
|
|
|
|
| |
general cleanup of the API. The entire API now consists of two functions
similar to the pre-KSE API. The suser() function takes a thread pointer
as its only argument. The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0. The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.
Discussed on: smp@
|
|
|
|
|
|
| |
exceeded the peer's configured MRU or MRRU.
MFC after: 1 week
|
|
|
|
|
|
| |
use (and abuse) the node locking system.
MFC after: 1 week
|
|
|
|
| |
reference.
|
|
|
|
|
|
| |
Submitted by: Andre Albsmeier <andre@albsmeier.net>
Shuffled about by: brian
Approved by: julian
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
Submitted by: Harti Brandt <brandt@fokus.gmd.de>
|
|
|
|
|
|
|
|
|
|
| |
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.
Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
|
|
|
|
|
|
|
|
|
|
|
|
| |
a particular Ethernet interface will actually be delivered by (only) that
device driver. This is not necessarily true when ng_ether(4) is used.
To word around this, while a ng_ether(4)'s "upper" hook is connected,
turn off all hardware checksum, fragmentation, etc., features for that
interface.
PR: kern/31586
MFC after: 1 week
|
|
|
|
|
| |
Reviewed by: dg, bmilekic
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for
information. Make sure when generating default values that we provide
a valid header to peek into.
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
Make fget MPsafe.
Make fgetvp and fgetsock use the fget subsystem to reduce code bloat.
Push giant down in fpathconf().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Seigo Tanimura (tanimura) posted the initial delta.
I've polished it quite a bit reducing the need for locking and
adapting it for KSE.
Locks:
1 mutex in each filedesc
protects all the fields.
protects "struct file" initialization, while a struct file
is being changed from &badfileops -> &pipeops or something
the filedesc should be locked.
1 mutex in each struct file
protects the refcount fields.
doesn't protect anything else.
the flags used for garbage collection have been moved to
f_gcflag which was the FILLER short, this doesn't need
locking because the garbage collection is a single threaded
container.
could likely be made to use a pool mutex.
1 sx lock for the global filelist.
struct file * fhold(struct file *fp);
/* increments reference count on a file */
struct file * fhold_locked(struct file *fp);
/* like fhold but expects file to locked */
struct file * ffind_hold(struct thread *, int fd);
/* finds the struct file in thread, adds one reference and
returns it unlocked */
struct file * ffind_lock(struct thread *, int fd);
/* ffind_hold, but returns file locked */
I still have to smp-safe the fget cruft, I'll get to that asap.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
socreate(), rather than getting it implicitly from the thread
argument.
o Make NFS cache the credential provided at mount-time, and use
the cached credential (nfsmount->nm_cred) when making calls to
socreate() on initially connecting, or reconnecting the socket.
This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well
as bugs involving NFS and mandatory access control implementations.
Reviewed by: freebsd-arch
|
| |
|
|
|
|
|
|
| |
callout is still pending.
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
also don't use ANSI string concatenation.
|
|
|
|
|
|
|
|
| |
to be included in the meta information that is associated with
incoming and outgoing packets.
Reviewed by: julian
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
hooks depending on ethertype. Great for prototyping protocols.
connects to the lower and upper hooks of an ethernet type of node.
Obtained from: Monzoon Networks.
Thanks to Andre Oppermann, May 2001.
|
| |
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
| |
Noticed by: jdp
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Allow the sending of more than one control message at a time
over a unix domain socket. This should cover the PR 29499.
2) This requires that unp_{ex,in}ternalize and unp_scan understand
mbufs with more than one control message at a time.
3) Internalize and externalize used to work on the mbuf in-place.
This made life quite complicated and the code for sizeof(int) <
sizeof(file *) could end up doing the wrong thing. The patch always
create a new mbuf/cluster now. This resulted in the change of the
prototype for the domain externalise function.
4) You can now send SCM_TIMESTAMP messages.
5) Always use CMSG_DATA(cm) to determine the start where the data
in unp_{ex,in}ternalize. It was using ((struct cmsghdr *)cm + 1)
in some places, which gives the wrong alignment on the alpha.
(NetBSD made this fix some time ago).
This results in an ABI change for discriptor passing and creds
passing on the alpha. (Probably on the IA64 and Spare ports too).
6) Fix userland programs to use CMSG_* macros too.
7) Be more careful about freeing mbufs containing (file *)s.
This is made possible by the prototype change of externalise.
PR: 29499
MFC after: 6 weeks
|
| |
|
|
|
|
| |
ng_ether.c.
|
|
|
|
| |
main IP input processing code.
|
|
|
|
| |
correct one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow an in-kernel webserver (or similar) to accept
and handle incoming connections using netgraph without ever leaving the
kernel. (allows incoming tunnel requests to be
handled totally within the kernel for example)
Needs work, but shouldn't break existing functionality.
Submitted by: John Polstra <jdp@polstra.com>
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
| |
interfaces of type IFT_L2VLAN as well as IFT_ETHER during module load.
Submitted by: yar
|
| |
|
|
|
|
|
|
|
| |
4 bytes to the right on the alpha.
Tested by: Thomas Pornin <Thomas.Pornin@ens.fr>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LISTENed for, return EEXISTS.
Only match the magic "*" service tag if no other LISTEN service tags
match.
Require an explicit LISTEN for an empty service tag in order to match
empty service requests.
Approved by: julian
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
improved readability. The two real functional changes are that
netgraph now sees this as the "split" node type rather then the
"ng_split" node type and that meta data is passed through without
processing rather then being dropped.
Reviewed by: jhb, julian
MFC after: 7 weeks
|
| |
|
|
|
|
|
|
|
|
|
| |
sending it along a hook.
PR: 27906
Submitted by: Harti Brandt <brandt@fokus.gmd.de>
no MFC as code is different in 4.x
|
|
|
|
| |
475: warning: unsigned int format, long unsigned int arg (arg 3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
machines. The code formerly read:
long val;
if (val < (long)-0x80000000 || ...)
return EINVAL;
The constant 0x80000000 has type unsigned int. The unary `-'
operator does not change the type (or the value, in this case).
Therefore the promotion to long is done by 0-extension, giving
0x0000000080000000 instead of the desired 0xffffffff80000000. I
got rid of the `-' and changed the cast to (int32_t) to give proper
sign-extension on all architectures and to better reflect the fact
that we are range-checking a 32-bit value.
This commit also makes the analogous changes to ng_int{8,16}_parse
for consistency.
MFC after: 3 days
|