summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ether.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't send packets out an interface unless it is IFF_UP|IFF_RUNNING.archie2002-05-091-2/+10
| | | | | | | This fixes panics with certain Ethernet drivers when doing bridging, PPPoE, etc. before the driver has been fully brought up. MFC after: 1 week
* The hardware checksum code makes the assumption that a packet routed outarchie2002-02-051-2/+9
| | | | | | | | | | | | 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
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-6/+6
| | | | also don't use ANSI string concatenation.
* KSE Milestone 2julian2001-09-121-0/+3
| | | | | | | | | | | | | | 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
* 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
* Implement direct support for semipersistant nodes.julian2001-01-301-30/+26
| | | | | | | | | | | | | (e.g. ethernet nodes are persistent until you rip out the hardware) Use this support in the ethernet and sample nodes. Add some more abstraction on the 'item's so that node and hook reference counting can be checked easier. Slight man page correction. Make pppoe type dependent on ethernet type. Clean up node shutdown a little. Move a mutex from MTX_SPIN to MTX_DEF (oops) Fix small ref-counting bug. remove warning on one2many type.
* Add a generic "queued function callin" mechanismjulian2001-01-141-0/+1
| | | | | | Use it to implement (hopefully) SMP safe node/hook addition and removal. Fix some debug stuff.
* Part 2 of the netgraph rewrite.julian2001-01-081-24/+23
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-061-29/+45
| | | | | | | | This version is functional and is aproaching solid.. notice I said APROACHING. There are many node types I cannot test I have tested: echo hole ppp socket vjc iface tee bpf async tty The rest compile and "Look" right. More changes to follow. DEBUGGING is enabled in this code to help if people have problems.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-181-1/+1
| | | | | | | | | format version number. (userland programs should not need to be recompiled when the netgraph kernel internal ABI is changed. Also fix modules that don;t handle the fact that a caller may not supply a return message pointer. (benign at the moment because the calling code checks, but that will change)
* Reviewed by: Archie@freebsd.orgjulian2000-12-121-7/+18
| | | | | | | | | | | | | This clears out my outstanding netgraph changes. There is a netgraph change of design in the offing and this is to some extent a superset of soem of the new functionality and some of the old functionality that may be removed. This code works as before, but allows some new features that I want to work with and evaluate. It is the basis for a version of netgraph with integral locking for SMP use. This is running on my test machine with no new problems :-)
* Fix a bug where if the interface was in promiscuous mode when thearchie2000-12-111-0/+2
| | | | | | | last hook was disconnected, the interface would not get reset to non-promiscuous mode. Reported by: jdp
* Add the use of M_ZERO to netgraph.dwmalone2000-11-181-2/+1
| | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Submitted by: archie Approved by: archie
* When sending a packet back to a network interface to simulate an arrivedjulian2000-09-191-0/+1
| | | | | packet, make sure that the packet has the interface marked in the first mbuf, the same a truely arrived packets would have.
* Fix wrong offset bug in ng_enaddr_unparse().archie2000-09-011-1/+2
|
* Add three more control messages to complement their opposites:archie2000-08-151-9/+99
| | | | | NGM_ETHER_SET_ENADDR, NGM_ETHER_GET_PROMISC, and NGM_ETHER_GET_AUTOSRC. Alter parsing algorithm so the EN address really looks like one.
* Take advantage of the new unsigned and hex integer types.archie2000-08-101-2/+2
|
* Add three new control messages to the ng_ether(4) netgraph node type:archie2000-08-071-4/+80
| | | | | | NGM_ETHER_GET_ENADDR: Get the device's Ethernet address NGM_ETHER_SET_PROMISC: Enable/disable promiscuous mode NGM_ETHER_SET_AUTOSRC: Enable/disable packet source address override
* Remove node's name reference when the interface is detached;archie2000-07-191-0/+1
| | | | | | | | otherwise, the ng_ether.ko KLD will never be unloadable after all Ethernet interfaces are detached, as it should be, because of the lingering extra reference. Submitted by: "Yevmenkin, Maksim N, CSCIO" <myevmenkin@att.com>
* Set NG_INVALID flag when destroying node.archie2000-07-141-0/+1
|
* Fix race condition caused by using NG_SEND_DATAQ() where we meantarchie2000-07-121-3/+1
| | | | | | to use ng_queue_data(). Reported by: Udo Erdelhoff <ue@nathan.ruhr.de>
* Don't forget to set our MAC address into packets we wre sending out viajulian2000-07-061-0/+6
| | | | | | netgraph. Eventually we may need to have a separate hook for packets that already have a source AMC address but for now just drop it in. Should fix PPPoE.
* Make the ng_ether(4) node type dynamically loadable like the rest.archie2000-06-261-0/+633
This means 'options NETGRAPH' is no longer necessary in order to get netgraph-enabled Ethernet interfaces. This supports loading/unloading the ng_ether.ko and attaching/detaching the Ethernet interface in any order. Add two new hooks 'upper' and 'lower' to allow access to the protocol demux engine and the raw device, respectively. This enables bridging to be defined as a netgraph node, if so desired. Reviewed by: freebsd-net@freebsd.org
OpenPOWER on IntegriCloud