summaryrefslogtreecommitdiff
path: root/sys/net/if_bridge.c
AgeCommit message (Collapse)Author
2008-10-16* Allow ether_input() and vlan_input() to handle incoming packetsChristian Weisgerber
where the tag is stored in the mbuf header. * Make bridge(4) handle interfaces with and without hardware tag support and forward packets inbetween. Help and ok claudio@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-09-02remove dead stores and newly created unused variables.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok henning@ mpf@
2008-06-14add carppeer; an option to specify a different multicast address orReyk Floeter
even the unicast address of the remote carp peer. this especially helps when the multicast carp advertisements are causing problems in the network (some crappy switches don't do well with multicast), there are conflicts with VRRP, or the policy of the network does not allow multicast (most Internet eXchange points didn't allow carped OpenBGP routers because of the multicast advertisements). discussed with many ok mpf@
2008-05-21Only cancel (timeout_del()) the timeout if we're not going to delay itMichael Knudsen
(timeout_add()) anyway. ok brad claudio
2008-05-07enable tx mitigation when putting packets on the wire by switching fromDavid Gwynne
calls to ifp->if_start to if_start(). these are the obviously right cases where we can do that, the less obvious ones may follow as theyre figured out. deraadt@ said to go for it
2008-04-24the softnet intr handlers check if the input queue has packets onDavid Gwynne
it by reading the queues head pointer. if that pointer is not null then it takes splnet and dequeues a packet for handling. this is bad because the ifqueue head is modified at splnet and the sofnet handlers read it without holding splnet. this removes that check of the head pointer and simply checks if the dequeue gave us a packet or not before proceeding. found while reading mpls code. discussed with norby@ and henning@ ok mcbride@ henning@
2007-12-20return with ENOTTY instead of EINVAL for unknown ioctl requests.Brad Smith
ok claudio@ krw@ jason@ dlg@
2007-09-15malloc sweep:Henning Brauer
-remove useless casts -MALLOC/FREE -> malloc/free -use M_ZERO where appropriate instead of seperate bzero feedback & ok krw, hshoexer
2007-05-28double pf performance.Henning Brauer
boring details: pf used to use an mbuf tag to keep track of route-to etc, altq, tags, routing table IDs, packets redirected to localhost etc. so each and every packet going through pf got an mbuf tag. mbuf tags use malloc'd memory, and that is knda slow. instead, stuff the information into the mbuf header directly. bridging soekris with just "pass" as ruleset went from 29 MBit/s to 58 MBit/s with that (before ryan's randomness fix, now it is even betterer) thanks to chris for the test setup! ok ryan ryan ckuethe reyk
2007-05-28Users of arc4random() should include dev/rndvar.h directly.Ryan Thomas McBride
ok dlg claudio
2007-05-26one extern seems to be better than 20 for ifqmaxlen; ok krwJason Wright
2007-05-21make bridge(4) mark packets with M_PROTO1 if gif(4) needs to useMarkus Friedl
etherip encapsulation; unbreaks remote ipsec bridges; ok claudio; additional testing Renaud Allard
2007-05-16fix return values in bridge_output.Michele Marchetto
OK claudio@ jason@
2007-05-15Update the ifp of bridge cache entries if the entry is not static. ThisClaudio Jeker
makes carp(4) fail-over work over bridge(4). OK michele@ jason@
2007-04-10``it's'' -> ``its'' when the grammar gods require this change.Miod Vallat
2007-01-08discard packet and return if ifp is not a member of the bridgeMichele Marchetto
this fix PR 5056 discussed with camield@ OK camield@ claudio@ henning@
2006-12-28check if ifqueue has anything queued before doing the dance ofTheo de Raadt
splnet/IF_DEQUEUE/splx; ok various people
2006-12-11refer to the RSTP point to point option as "PTP" instead of "P2P".Reyk Floeter
P2P is commonly used in relation to peer to peer networks, PTP is used in various protocols for layer 2 point to point links (ie., full duplex ethernet links). note that the newly added brconfig commands [-]p2p and [-]autop2p will change to [-]ptp and [-]autoptp. suggested by Andrew Thompson (thompsa@freebsd.org)
2006-12-03Add Rapid Spanning Tree Protocol support (802.1d-2004) based on workReyk Floeter
by Andrew Thompson (thompsa@freebsd.org). The local changes include adoption to our bridge code, reduced stack usage and many other bits. If stp is enabled, RSTP will now be used by default. Thanks for help from Andrew. This code has been in snaps for while now, commit encouraged by deraadt@
2006-11-30no need for #if NPF > 0 inside #if NPF > 0Henning Brauer
From: Genadijus Paleckis <lsd@nnt.lt> but the really bad description of the diff made this way more complicated then needed. pls plz, when sending in diffs, describe properly what they do and why!
2006-07-06argh, again i forgot a file. sorryHenning Brauer
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-01-23support PMTU-Discovery for link2 ipsec bridges; ok claudioMarkus Friedl
2006-01-05bzero buffers after malloc, or clear string buffer before strlcpy'ingTheo de Raadt
into them, if you are gonna copy it out to userland some ok dhartmei, some ok tedu
2006-01-04Remove redundant calls to bpfdetach.Can Erkin Acar
ok brad@
2005-10-09if the wireless hostap interface belongs to a bridge, learn the node'sReyk Floeter
address dynamically on this interface after successful association. this could speed wireless roaming to openbsd accesspoints. ok jason@, jsg@ can't see anything obectionable
2005-07-31Change the API for icmp_do_error so that it takes the mtu directly, ratherChristopher Pascoe
than a pointer to struct ifnet containing it. Saves a 448 byte stack allocation in ip_forward which previously faked up a struct ifnet just for this purpose. idea ok deraadt millert
2005-06-16no need for NVLAN; ok jason, brad, camielMarkus Friedl
2005-04-25csum -> csum_flagsBrad Smith
ok krw@ canacar@
2005-04-25Use ETHERTYPE_VLAN.Brad Smith
2004-12-23Simplify hashtable (de)allocation by moving it into the clone functions.Camiel Dobbelaar
ok mickey@ henning@, "looks good" markus@ jason@
2004-12-19Make it possible for carp to work on fddi and token ring again.Ryan Thomas McBride
ok pascoe@ mpf@
2004-12-17Reorder code in the ethernet output path, and enhance unicast addressChristopher Pascoe
matching in the bridge receive path to make CARP operate correctly on physical interfaces that are participating in a bridge. ok mcbride@ henning@ dlg@
2004-10-09sizeof(struct ether_header) -> ETHER_HDR_LENBrad Smith
ok mcbride@
2004-08-18skip splx() for skiplookup; report Vafa D. Izadinia; ok henning, canacarMarkus Friedl
2004-06-21First step towards more sane time handling in the kernel -- this changesThorsten Lockert
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@
2004-06-21Get rid of pf_test_eh() wrapper.Ryan Thomas McBride
ok cedric@ henning@
2004-05-04Apply bridge filter rules to incoming packets destined to the local machine.Can Erkin Acar
Allows tagging of the incoming packets, and a single interface bridge to be actually useful for MAC level filtering/tagging. ok henning@
2004-05-04Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro.Alexander Yurchenko
This matches our SLIST behaviour and NetBSD's SIMPLEQ as well. ok millert krw deraadt
2004-04-28make return-rst work on pure bridges. ok dhartmei@ henning@ mcbride@Cedric Berger
2004-02-10plug mbuf leak (ip_fragment() always free mbuf on error). tested by cedric,Jun-ichiro itojun Hagino
dhartmei ok
2004-02-02missing #if NPF > 0. ok henning@Cedric Berger
2003-12-17start spanning tree on ifconfig up; from Marco Pfatschbacher; ok jason@Markus Friedl
2003-12-16when a bridge filter rule specifies both src and dst mac address, we do notHenning Brauer
want to compare both against the packet's source address. works much better when we compare the dst address to the packet's dst address. ok camield@ canacar@ markus@ jason@
2003-12-16return error in ifc_destroy; ok deraadt, itojun, cedric, hshoexerMarkus Friedl
2003-12-03add support for ifconfig clone/destroy; ok henning deraadtMarkus Friedl
2003-10-02do not try to send incomplete fragments on ENOBUFS caseJun-ichiro itojun Hagino
(behavior change from 4.4bsd). dhartmei ok
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@