summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
Commit message (Collapse)AuthorAgeFilesLines
* Backout previous change, it breaks build and it is not neededpjd2004-02-204-107/+13
| | | | | | | | layering violation. As pointed out, there is much better way to do this. Sorry guys, I need to find a better way to force reviews. Requested by: harti, julian, scottl (mentor) Pointy hat to: pjd
* Add new failure detection algorithm.pjd2004-02-192-1/+94
| | | | | | | | | | It works as follows: In every 'interval' seconds defined links are checked. If they are non-active they will not be used by to data transfer. No response from: julian, archie Silent on: net@ Approved by: scottl (mentor)
* Export private structure owned by ng_ether(4) module outside.pjd2004-02-192-12/+13
| | | | | | | | It'll is required by new failure detection algorithm for ng_one2many(4). No response from: julian, archie Silent on: net@ Approved by: scottl (mentor)
* Use the official ng_timeout function to trigger sending. This means,harti2004-01-301-22/+14
| | | | | that we can get rid of of all the spl*() calls, because ng_timeout handles the locking issues.
* Correct the description of the net.graph.recvspace sysctl.ru2004-01-271-1/+1
|
* Don't confuse NULL and 0, use 0 where an integer is expected.harti2004-01-271-2/+2
|
* Style: add __FBSDID, relocate some { that were on the wrong line,harti2004-01-271-36/+24
| | | | | correct some indendation, change __FUNCTION__ to __func__ and remove a local KASSERT definition.
* Replace deprecated NG_NODELEN with the new NG_NODESIZ. There is oneharti2004-01-263-4/+9
| | | | | | | problem here still to be solved: the sockaddr_hci has still a 16 byte field for the node name. The code currently does not correctly use the length field in the sockaddr to handle the address length, so node names get truncated to 15 characters when put into a sockaddr_hci.
* Get rid of the old *LEN constants in favour of the new *SIZ constantsharti2004-01-262-6/+6
| | | | that also include the trailing \0 byte.
* Define the new command NGM_SOURCE_START_NOW to allow generation ofharti2004-01-261-0/+1
| | | | | traffic for non-ethernet hooks. This commit should have been packaged with the commit to ng_source.c.
* Make ng_source to work with non-ethernet interfaces. We do this byharti2004-01-261-2/+37
| | | | | | | introducing a START_NOW command. This command does not send and GET_IFINDEX message downstream (to wait for the response from the ETHERNET node), but directly starts the sending process. This allows one to generate traffic as input for any hook on any node.
* Declare a function to silence a warning.harti2004-01-261-0/+2
|
* Should use the non-locking versions of the ifqueue macros toharti2004-01-261-7/+7
| | | | | | fiddle around with private queues, because their mutex is not needed. All this processing should be protected by the netgraph locking.
* Replace a call to bzero() with an M_ZERO flag. Replace the MALLOC() withharti2004-01-261-2/+1
| | | | malloc().
* The version in the type description must be the ABI version, notharti2004-01-261-3/+3
| | | | | | | the netgraph version. Correct the return type of a function: it wants to return an error code, so it cannot be void.
* Get rid of the deprecated *LEN constants in favour of the newharti2004-01-2612-65/+64
| | | | *SIZ constants that include the trailing \0 byte.
* Get rid of the deprecated *LEN constants and use the new *SIZharti2004-01-261-2/+2
| | | | (that include the trailing \0) constants instead.
* Allow the socket buffer sizes to be controlled via sysctl(8).ru2004-01-231-0/+4
| | | | MFC after: 3 days
* Simplify timing gymnastics a bit.phk2004-01-211-2/+2
|
* Add an "ethernet" hook to the rfc1490 netgraph module. It will sendgreen2004-01-142-7/+35
| | | | | and receive FCS-less RFC1490-"bridged" Ethernet packets that are currently just ignored.
* Also, don't crash in the netgraph disconnect node if the interface isgreen2004-01-091-1/+2
| | | | detached from the other direction.
* Don't try to ifpromisc() on an interface that's deleted already.green2004-01-091-4/+4
|
* o eliminate widespread on-stack mbuf use for bpf by introducingsam2003-12-281-8/+2
| | | | | | | | | | | | | a new bpf_mtap2 routine that does the right thing for an mbuf and a variable-length chunk of data that should be prepended. o while we're sweeping the drivers, use u_int32_t uniformly when when prepending the address family (several places were assuming sizeof(int) was 4) o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated mbufs have been eliminated; this may better be moved to the bpf routines Reviewed by: arch@ and several others
* NULL -> 0 where appropriate.alfred2003-12-245-23/+23
|
* The default value of net.graph.nonstandard_pppoe is changed to -1,yar2003-12-191-2/+2
| | | | | | | | | | | | | | | | which means "always stay in the standard mode of PPPoE operation regardless of any junk floating around." As the referenced PR stated clearly, the old default setting of 0 was extremely dangerous because it opened a possibility for a spurious frame not only to put down a single PPPoE node running FreeBSD, but to plague *every* FreeBSD node in a PPPoE network in such a way that those nodes would keep poisoning each other until rebooted simultaneously. PR: kern/47920 Reviewed by: Gleb Smirnoff <glebius <at> cell.sick.ru> MFC after: 1 week
* Fixed panic on hook disconnection that previous revision has introduced.ru2003-12-191-5/+8
|
* Fixed compilation on 64-bit platforms.ru2003-12-191-2/+2
|
* There are two modes of ng_pppoe operation, standard andyar2003-12-181-11/+38
| | | | | | | | | | | | | | | | | | | nonstandard. They differ in the values of certain fields in the PPPoE frame. Previously, ng_pppoe would start in standard mode, yet switch to nonstandard one upon reception of a single nonstandard frame. After having done so, ng_pppoe would be unable to interact with standard PPPoE peers. Thus, a DoS condition existed that could be triggered by a buggy peer or malicious party. Since few people have expressed their displeasure WRT this problem, the default operation of ng_pppoe is left untouched for now. However, a new value for the sysctl net.graph.nonstandard_pppoe is introduced, -1, which will force ng_pppoe stay in standard mode regardless of any bogus frames floating around. PR: kern/47920 Submitted by: Gleb Smirnoff <glebius <at> cell.sick.ru> MFC after: 1 week
* Removed an outdated comment.ru2003-12-181-2/+0
| | | | Submitted by: archie
* Use the (now standard) Ethernet address parse type.ru2003-12-172-39/+5
|
* Made the Ethernet address parse type standard.ru2003-12-175-67/+69
| | | | OK'ed by: archie
* Replaced two bzero() calls with the M_ZERO flag to malloc().ru2003-12-171-3/+2
| | | | Reviewed by: julian
* MFS: Make struct arpcom the first entry in softc. (There are at leastru2003-12-151-1/+1
| | | | | two functions in sys/net/if.c that assume that softc starts with arpcom.) This makes setting of ethernet address via ifconfig(8) work as expected.
* Pass MTX_DEF instead of 0 as the last argument to mtx_init().truckman2003-12-151-1/+2
| | | | Submitted by: Gavin Atkinson <gavin+freebsdc@ury.york.ac.uk>
* The last argument to mtx_init() should be MTX_DEF, not 0. This is not atruckman2003-12-082-5/+10
| | | | functional change since MTX_DEF happens to be defined as 0.
* Lower the maximum ACK timeout for GRE packets from 10 to 1 second.archie2003-11-181-1/+1
| | | | | | | | | In practice it seems that in situations of high packet loss the ACK timeout seems to hit this maximum (perhaps inappropriately, but the estimation algorithm is not perfect, so apparently it happens). In any case, 10 seconds is way too high a value so lower to 1 second. MFC after: 3 days
* Introduce a MAC label reference in 'struct inpcb', which cachesrwatson2003-11-182-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the MAC label referenced from 'struct socket' in the IPv4 and IPv6-based protocols. This permits MAC labels to be checked during network delivery operations without dereferencing inp->inp_socket to get to so->so_label, which will eventually avoid our having to grab the socket lock during delivery at the network layer. This change introduces 'struct inpcb' as a labeled object to the MAC Framework, along with the normal circus of entry points: initialization, creation from socket, destruction, as well as a delivery access control check. For most policies, the inpcb label will simply be a cache of the socket label, so a new protocol switch method is introduced, pr_sosetlabel() to notify protocols that the socket layer label has been updated so that the cache can be updated while holding appropriate locks. Most protocols implement this using pru_sosetlabel_null(), but IPv4/IPv6 protocols using inpcbs use the the worker function in_pcbsosetlabel(), which calls into the MAC Framework to perform a cache update. Biba, LOMAC, and MLS implement these entry points, as do the stub policy, and test policy. Reviewed by: sam, bms Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fixed two memory leaks.ru2003-11-171-1/+3
| | | | Reviewed by: harti
* Check the correct set of interface flags and fix a memory leak.ru2003-11-171-1/+2
| | | | Reviewed by: harti
* Change double include protection style in headers to matchemax2003-11-1417-17/+17
| | | | | | | the rest of Netgraph code. Reviewed by: imp, ru Approved by: imp (mentor)
* Make the defines that prevent multiple includes look like theharti2003-11-133-6/+6
| | | | others in netgraph.
* Bump the netgraph header version to 6 for the change of the nameharti2003-11-121-1/+1
| | | | | | length definitions. Reminded by: jdp
* Double length of node names, hook names, command strings and types. Addharti2003-11-122-6/+16
| | | | | | | | | | defines for these constants that include the trailing NUL byte. These new constants have SIZ in their name instead of LEN. As soon as all consumers in the tree are converted to use the new defines the old defines will be put under BURN_BRIDGES. Reviewed by: archie, julian, ru Approved by: re (in principle)
* MFS: Change interface name from "nge" to "ngeth" to avoid conflictru2003-11-111-1/+1
| | | | with nge(4).
* Use a single style of multiple inclusion protection for Netgraph headers.ru2003-11-1132-88/+88
| | | | Reviewed by: archie, harti, emax
* o add a flags parameter to netisr_register that is used to specifysam2003-11-081-1/+2
| | | | | | | | | | | | | | | | whether or not the isr needs to hold Giant when running; Giant-less operation is also controlled by the setting of debug_mpsafenet o mark all netisr's except NETISR_IP as needing Giant o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant o pickup Giant (when debug_mpsafenet is 1) inside ip_input before calling up with a packet o change netisr handling so swi_net runs w/o Giant; instead we grab Giant before invoking handlers based on whether the handler needs Giant o change netisr handling so that netisr's that are marked MPSAFE may have multiple instances active at a time o add netisr statistics for packets dropped because the isr is inactive Supported by: FreeBSD Foundation
* The layer 3 (signalling) of NgATM netgraph node: ng_uni. This nodeharti2003-11-073-0/+1203
| | | | handles user and network side signaling and partly PNNI.
* Replace the lock-less algorithm for the free item list with a moreharti2003-11-051-64/+36
| | | | | | | | | | | conservative lock. The problem with the lock-less algorithm is that it suffers from the ABA problem. Running an application with funnels a couple of 100kpkts/s through the netgraph system on a dual CPU system with MPSAFE drivers will panic almost immediatly with the old algorithm. It may be possible to eliminate the contention between threads that insert free items into the list and those that get free items by using the Michael/Scott queue algorithm that has two locks.
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-317-62/+43
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Netgraph part of the NgATM signalling AA layer. These nodes canharti2003-10-248-0/+2715
| | | | | also be used as a general-purpose transport protocol above any packet layer (IP, UDP).
OpenPOWER on IntegriCloud