summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
Commit message (Collapse)AuthorAgeFilesLines
* o Make the credential used by socreate() an explicit argument torwatson2001-12-311-1/+2
| | | | | | | | | | | | | | 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
* Typo.archie2001-12-151-1/+1
|
* Don't free a structure containing a 'struct callout' structure while thatarchie2001-12-151-8/+17
| | | | | | callout is still pending. MFC after: 3 days
* Add support for 56 bit MPPE encryption.archie2001-12-152-9/+12
| | | | MFC after: 3 days
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-1024-101/+101
| | | | also don't use ANSI string concatenation.
* When a socket is not connected, allow the peer "struct sockaddr"archie2001-11-282-13/+77
| | | | | | | | to be included in the meta information that is associated with incoming and outgoing packets. Reviewed by: julian MFC after: 1 week
* A node that allows ethernet type packets to be filtered to differentjulian2001-10-302-0/+588
| | | | | | | | 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.
* log routine called w/ %ld and int argument, cast argument to longdillon2001-10-291-1/+1
|
* Fix bug that cheated hook names out of the last 2 bytes.archie2001-10-101-2/+2
| | | | MFC after: 3 days
* Let "raw" mean IPPROTO_RAW instead of IPPROTO_IP.archie2001-10-101-1/+1
| | | | | Noticed by: jdp MFC after: 3 days
* Hopefully improve control message passing over Unix domain sockets.dwmalone2001-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed pedantic syntax error (trailing semicolon in enum).bde2001-10-041-1/+1
|
* Remove a couple unintentional mentions of Ethernet that crept in frombrooks2001-09-281-2/+2
| | | | ng_ether.c.
* Add ng_ip_input. A new netgraph node for queuing IP packets into thebrooks2001-09-272-0/+217
| | | | main IP input processing code.
* The initial commit contained an error in the license, this is thebrooks2001-09-274-9/+21
| | | | correct one.
* /home/brooks/ng_gif.messagebrooks2001-09-264-0/+1122
|
* KSE Milestone 2julian2001-09-127-28/+50
| | | | | | | | | | | | | | 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
* First pass at porting John's "accept" changes tojulian2001-09-072-49/+383
| | | | | | | | | | | | 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
* MFS: change name of sysctl to something more diplomatic.julian2001-09-041-9/+9
|
* Fix kernel crash when VLANs are combined with ng_ether(4), by attachingarchie2001-08-301-1/+2
| | | | | | interfaces of type IFT_L2VLAN as well as IFT_ETHER during module load. Submitted by: yar
* Fix two typosbrian2001-08-211-2/+2
|
* Pack struct uniqtag declarations to stop our data field from being pushedbrian2001-08-021-2/+2
| | | | | | | 4 bytes to the right on the alpha. Tested by: Thomas Pornin <Thomas.Pornin@ens.fr> MFC after: 1 week
* If an attempt is made to LISTEN for a service tag that's already beingbrian2001-07-251-14/+28
| | | | | | | | | | | | | 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
* General cleanup providing better style(9) conformance and generallybrooks2001-07-242-91/+47
| | | | | | | | | | 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
* Add an external function to unlink a netgraph type from the types list.julian2001-07-232-0/+21
|
* remember to set the return address in a message whenjulian2001-07-141-0/+1
| | | | | | | | | sending it along a hook. PR: 27906 Submitted by: Harti Brandt <brandt@fokus.gmd.de> no MFC as code is different in 4.x
* Fix warning: (int/long mixup in printf)peter2001-06-151-1/+1
| | | | 475: warning: unsigned int format, long unsigned int arg (arg 3)
* Fix a range checking bug in ng_int32_parse which affected 64-bitjdp2001-05-191-4/+5
| | | | | | | | | | | | | | | | | | | | | 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
* Remove unneeded includes in the i386 case.jhb2001-05-151-5/+0
|
* Don't reference a node after we dropped a reference to itarchie2001-04-111-1/+2
| | | | (same as in previous checkin, but in a different function).
* Catch up to header include changes:jhb2001-03-281-0/+1
| | | | | - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
* netgraph.h:julian2001-03-103-24/+65
| | | | | | | | | | | | | | | | | | | Change a prototype. Add a function version of ng_ref_node() when debugging so a breakpoint can be set on it. ng_base.c: add 'node' as an argument to ng_apply_item so that it is up to the caller to take over and release the item's reference on the node. If the release reports back that the node went away due to the reference going to 0, the caller should cease referencing the now defunct node. (e.g. the item was a 'kill node' message). Alter ng_unref_node to report back the residual references as a result. ng_pptpgre.c: Don't reference a node after we dropped a reference to it. (What if it was the last?) Fixes a node leak reported by Harti Brandt <brandt@fokus.gmd.de> which was due to an incorrect earlier attempt to fix the "accessing node after dropping the last reference" problem.
* Fix potential crash caused by packets with bogus ACK's.archie2001-03-081-1/+2
| | | | Reported by: Fabien THOMAS <fabient@netasq.com>
* Cleanups to Macros for sending data between netgraph nodes.julian2001-03-032-63/+32
|
* Add parenthesis to a macro.julian2001-03-031-1/+1
| | | | This took me 2 whole days to track down. (bleah)
* Shuffle netgraph mutexes a bit and hold a reference on a nodejulian2001-02-281-2/+4
| | | | from the function that is calling the destructor.
* Allow a changed MAC address to show up in ifconfig by changing itjulian2001-02-262-1/+14
| | | | in the ifaddr list as well. Also change an error return in the base system.
* slight cleanups during testing.julian2001-02-252-20/+46
|
* Add a node that looks to all the word like an ethernet but delivers itsjulian2001-02-252-0/+733
| | | | | | | | | | ehternet frames to a netgraph hook. Submitted by: "Vitaly V. Belekhov" <vitaly@riss-telecom.ru> translated to 5.0 by me. man page not yet written. This node still needs a little work.. don't use yet. Not yet linked into the build.
* Make the sample netgraph node compileable again.julian2001-02-251-6/+3
| | | | | Makes it easier for people if they can start with something that actually compiles.
* Add knowledge of the netgraph spinlocks into the Witness code.julian2001-02-241-5/+12
| | | | Well, at least I think that's how it's done.
* Shuffle sysctls a bit (thankyou whoever made them dynamic for modules)julian2001-02-235-7/+59
| | | | | | | | | | | | and add a sysctl to pppoe to activate non standard ethertypes so that idiot ISPs (apparently in France) who use equipment from idiot suppliers (rumour says 3com) who use nonstandard ethertypes can still connect. "yep, sure we do pppoe, we use a different identifier to that dictated in the standard, but sure it's pppoe!" sysctl -w net.graph.stupid_isp=1 enables the changeover.
* Add a 'splitter' node to separate a bidirectionaljulian2001-02-222-0/+272
| | | | | | | | | | packet flow into two unidirectional flows. Part of a suite of nodes developed for packet flow control. More to follow as I have time to port them to 5.x or as others do so. The ipfw node will be the hardest.. Submitted by: "Vitaly V. Belekhov" <vitaly@riss-telecom.ru>
* Preceed/preceeding are not english words. Use precede and preceding.asmodai2001-02-181-1/+1
|
* Fix an erroneous comment and two style(9) bugs.archie2001-02-161-3/+5
|
* Change and clean the mutex lock interface.bmilekic2001-02-091-67/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Add a dummy disconnect function so that the socket code doesn't leap intojulian2001-02-051-2/+7
| | | | | space when it calls the disconnect PRU function without checking that it there.
* Make netgraph modules refuse to link with modules of a different ABI version.julian2001-02-053-39/+75
| | | | | | also try implement teh documented behaviour in socket nodes so that when there is only one hook, an unaddressed write/send will DTRT and send the data to that hook.
* Change the kernel internal ABI number as the HOOK structure has changed.julian2001-02-011-1/+1
| | | | Forgotten by: me
* Clean up reference counting with relation to queued packets and the worklist,julian2001-02-012-138/+107
| | | | | | and while I'm there, clean up the worklist insertion and removal. Inspired by: Harti Brandt <brandt@fokus.gmd.de>
OpenPOWER on IntegriCloud