summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* there was code insidehenning2007-05-291-9/+4
| | | | | | | | | | #if NPF > 0 to prevent feeding back the mbuf do looutput if we are on simplex interfaces and the packet has been routed by pf, whch can lead to a loop in weird corner cases. apparently nobody triggered these cases in ages, since pf.h was not included and thus NPF not defined and thus this code not compiled. ok theo
* fix return values in bridge_output.michele2007-05-161-2/+2
| | | | OK claudio@ jason@
* count the number of multicast ranges that are kept in the list of multicastdlg2007-05-161-1/+5
| | | | | | | addresses in struct arpcom. this lets a nic driver easily see if it wants allmulti behaviour, which in turn means we can clean some code up. ok jason@ claudio@ norby@
* Add IP load balancing support for carp(4).mpf2007-03-181-6/+16
| | | | | | | | | | | | | This provides a similar functionality as ARP balancing, but also works for traffic that comes across routers. IPv6 is supported as well. The configuration scheme will change as soon we have sth better. Also add support for changing the MAC address on carp(4) interfaces. (code from mcbride) Tested by pyr@ and reyk@ OK mcbride@
* use LINK_STATE_IS_UP(ifp0->if_link_state) instead ofreyk2006-12-071-2/+2
| | | | | | | ifp0->if_link_state == LINK_STATE_UP to handle the new half/full duplex link states. i forgot to commit these snippets before. ok jsg@
* ether_input_mbuf() isn't necessary, turn it into a macro and deal withjason2006-10-311-17/+6
| | | | | it's "special" case in ether_input(). Based on similiar idea in FreeBSD. ok brad
* adjust functions dealing with the routing table to take a table ID ashenning2006-06-161-3/+3
| | | | | | parameter so they can work on alternate tables. table 0 hardcoded for many callers yet, that will be adapted step by step. input + ok claudio norby hshoexer
* rename jumbo mtu to if_hardmtu; ok brad reykderaadt2006-05-261-9/+3
|
* add a if_jumbo_mtu field to the interface structure for driversreyk2006-05-191-1/+10
| | | | | | | | supporting ethernet jumbo frames. there's no standard for the size of jumbo MTUs, so either let the driver set it's own value or use 9000 byte jumbo frames by default. ok brad@
* With the exception of two other small uncommited diffs this movesbrad2006-03-041-5/+5
| | | | | | the remainder of the network stack from splimp to splnet. ok miod@
* re-implement the bpf "filter drop" option that it actually works. thereyk2005-11-031-1/+9
| | | | | | | | | | | | | | | | bpf FILDROP interface exists for about one year but the required interface to the drivers was missing - so it was useless. this new approach based on a design by henning@ uses a new mbuf flag to mark filtered packets and to drop them in the generic network stack input routines (like ether_input). for example; after some additional testing, this could be used by dhclient to filter everything except DHCP packets (track tech@ for a corresponding dhclient diff). the "filter dropped" packets won't reach the network stack. so it's probably some kind of a very basic application layer packet filter ;). ok canacar@, discussed with henning@ and others
* make pf use one mbuf tag instead of 6 distinct ones. use a little structhenning2005-10-171-4/+9
| | | | | | | | | in the data part for the data from the previously distinct tags. look up the tag early and carry a pointer to it around. makes the code easier and saves some tag lookups and thus helps performance, as proven by tests run by Schberle Dniel <Schoeberle.Daniel@aamtech.hu> Initially hacked up somewhere over the atlantic ocean in an A330 early testing reyk and moritz, "put it in" theo
* remove old unused NRL IPv6 code.brad2005-09-301-24/+1
| | | | ok deraadt@
* bye bye netns (and a few leftover DECNET bits while here)henning2005-06-081-39/+1
|
* Run vlan_input before bridge_input, and change vlan_input to notcamield2005-06-071-3/+9
| | | | | | | | | | consume vlan frames that no vlan interface wants, so they can still be bridged. This way, the bridge can bridge encapsulated frames _and_ bridge between vlan interfaces. ok henning markus
* do not handle CCITT any longerhenning2005-06-071-74/+1
|
* oopsderaadt2005-05-241-2/+2
|
* let ramdisks compile again. people -- please always try to compile with your new options off, tooderaadt2005-05-241-2/+5
|
* support trunk stacking (trunks as trunk ports) and some fixesreyk2005-05-241-4/+9
| | | | ok brad@
* initial import of a trunking (link aggregation and link failover)reyk2005-05-241-1/+22
| | | | | | | implementation. it currently supports round robin mode with link state checking, additional modes will be added later. ok brad@, deraadt@
* Use ETHERTYPE_VLAN.brad2005-04-251-2/+2
|
* Rewriting the lladdr can now be done without using mbuf tags.mpf2005-01-181-5/+4
| | | | | | | | | | Advertisements run through the carp interface first. So we just take the address from ifp0. While we're there, also remove carp_macmatch6, which isn't used anymore. Proposed by mcbride@ ok mcbride@, pascoe@
* Make it possible for carp to work on fddi and token ring again.mcbride2004-12-191-2/+3
| | | | ok pascoe@ mpf@
* Reorder code in the ethernet output path, and enhance unicast addresspascoe2004-12-171-9/+9
| | | | | | | matching in the bridge receive path to make CARP operate correctly on physical interfaces that are participating in a bridge. ok mcbride@ henning@ dlg@
* Rename carp_output() to carp_fix_lladdr().mcbride2004-12-101-2/+2
|
* Remove shadow variable 'error'. From camield@mcbride2004-12-091-2/+1
|
* Convert carp(4) to behave more like a regular interface, much in the samemcbride2004-12-071-8/+32
| | | | | | | | style as vlan(4). carp interfaces no longer require the physical interface to be on the same subnet as the carp interface, or even that the physical interface has an adress at all, so CARP can now be used on /30 networks. ok deraadt@ henning@
* KNFmcbride2004-12-071-26/+29
|
* In kernel pppoe client, a simple IPv4 only implementation.canacar2004-11-281-1/+40
| | | | | | Initial porting from NetBSD by David Berghoff. Modified/simplified to match our sppp implementation. ok deraadt@
* sizeof(struct ether_header) -> ETHER_HDR_LENbrad2004-10-091-4/+4
| | | | ok mcbride@
* remove netiso shitz, millert okhenning2004-07-161-118/+1
|
* Add a table-driven implementation of ether_crc32_be().naddy2004-06-261-17/+43
| | | | | | | | From Seishi Hiragushi via FreeBSD PR kern/49957. Also, while we're here, make the loop counter size_t. ok mcbride@
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-2/+2
| | | | | | | | things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
* add a congestion indicator to if_queue. It is set when the input queuehenning2004-04-171-6/+2
| | | | | | | | is full, along with a timer that unsets it again after 10ms. The input queue beeing full is a reliable indicator for CPU overload, and this flag allows other subsystems to cope with the situation. hacked with beck ok kjc@ markus@ beck@
* 18 -> ETHER_ADDR_LEN*3 in ether_sprintf() for clarityavsm2004-02-151-2/+2
| | | | itojun@ ok
* fix leak ether_deatch(): if if_free_sadl() is called before if_detach()markus2004-01-091-1/+4
| | | | | then ifnet_addrs[ifp->if_index] leaks; if it's called after if_detach() then if_free_sadl() does nothing; ok itojun
* de-register. deraadt okitojun2003-12-101-21/+21
|
* "goto bad" on error with carp_input, instead of simply returning.mcbride2003-10-251-2/+2
| | | | | | Fixes leakage of mbufs on error. Pointed out by Max Laier.
* Common Address Redundancy Protocolmcbride2003-10-171-1/+21
| | | | | | | | | | Allows multiple hosts to share an IP address, providing high availability and load balancing. Based on code by mickey@, with additional help from markus@ and Marco_Pfatschbacher@genua.de ok deraadt@
* prevent looutput() feedback of broadcast/multicast packets if they aredhartmei2003-08-181-2/+3
| | | | | pf routed. prevents a kernel lockup with some (non-sensical) route-to rules. report and debugging by mpech@. ok itojun@, henning@, mpech@.
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* KNFderaadt2003-02-161-2/+2
|
* remove the altq classifier code which is replaced by pf and no longer used.kjc2003-01-071-102/+2
| | | | ok henning@, deraadt@
* KNF - return is not a function.itojun2002-09-111-3/+3
|
* allocate sockaddr_dl for ifnet in if_alloc_sadl(), as we don't always knowitojun2002-06-301-13/+7
| | | | | the size of sockaddr_dl on if_attach() - for instance, see ether_ifattach(). from netbsd. fgs ok
* Split common code which converts a multicast address to an ethernetchris2002-06-101-105/+80
| | | | | | | | | address from ether_addmulti() and ether_delmulti() into ether_multiaddr(), a'la netbsd. Also clean up some magic numbers. itojun likes it
* sync with KAME.kjc2002-05-171-5/+8
| | | | | - make altq_etherclassify() able to handle packets whose ethernet header is in a separate mbuf.
* move ether_crc32_le to if_ethersubr.c. Add ether_crc32_benate2002-05-071-1/+75
|
* Quiet down an annoying message in altq_etherclassify.art2002-02-071-1/+3
|
* Use queue.h TAILQ macros instead of accessing members directly.jason2001-12-091-5/+4
| | | | (And convert a few loops to TAILQ_FOREACH).