summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridgevar.h
Commit message (Collapse)AuthorAgeFilesLines
* Add an option to limit the number of source MACs that can be behind a bridgethompsa2007-11-041-0/+5
| | | | | | | | interface. Once the limit is reached packets with unknown source addresses are dropped until an existing host cache entry expires or is removed. Useful to use with the STICKY cache option. Sponsored by: miniSuperHappyDevHouse NZ
* Add a bridge interface flag called PRIVATE where any private port can notthompsa2007-08-011-1/+3
| | | | | | | | | | | | | | | communicate with another private port. All unicast/broadcast/multicast layer2 traffic is blocked so it works much the same way as using firewall rules but scales better and is generally easier as firewall packages usually do not allow ARP blocking. An example usage would be having a number of customers on separate vlans bridged with a server network. All the vlans are marked private, they can all communicate with the server network unhindered, but can not exchange any traffic whatsoever with each other. Approved by: re (rwatson)
* Avoid holding the softc lock when using copyout().thompsa2007-07-261-1/+0
| | | | | Reported by: dfr Approved by: re (rwatson)
* Add the vlan tag to the bridge route table. This allows a vlan trunk to bethompsa2007-06-131-0/+1
| | | | | | | bridged, previously legitimate traffic was not passed as the bridge could not tell that it was on a different Ethernet segment. All non-tagged traffic is treated as vlan1 as per IEEE 802.1Q-2003
* These days P2P means peer-2-peer (also well known from serveral filesharingthompsa2006-12-111-5/+5
| | | | | | | protocols) while PointToPoint has been PtP links. Change the variables accordingly while the code is still fresh and undocumented. Requested by: bz
* Add two new flags to if_bridge(4) indicating whether the edge flagsyrinx2006-12-041-1/+4
| | | | | | | | | | | | | | of the bridge port and path cost have been administratively set or calculated automatically by RSTP. Make sure to transition from non-edge to edge when the port goes down and the edge flag was manually set before. This is needed to comply with the condition ((!portEnabled && AdminEdge) || ....) in the Bridge Detection State Machine (IEE802.1D-2004, p. 171). Reviewed by: thompsa Approved by: bz (mentor)
* Sync with the OpenBSD port of RSTPthompsa2006-11-271-11/+15
| | | | | | | | | - use flags rather than sperate ioctls for edge, p2p - implement p2p and autop2p flags - define large pathcost constant as ULL - show bridgeid and rootid in ifconfig Obtained from: Reyk Floeter <reyk@openbsd.org>
* Add a new address cache type called sticky. On an interface marked sticky anythompsa2006-11-091-2/+4
| | | | | | | | address learned by the bridge is made permanent, the address will not age out and most importantly will not migrate to another interface. This can be used to stop mac address poisoning or clients roaming in much the same way as static entries without the hassle of preloading the table.
* Bring in support for the Rapid Spanning Tree Protocol (802.1w).thompsa2006-11-011-3/+18
| | | | | | | | | | RSTP provides faster spanning tree convergence, the protocol will exchange information with neighboring switches to quickly transition to forwarding without creating loops. The code will default to RSTP mode but will downgrade any port connected to a legacy STP network so is fully backward compatible. Reviewed by: syrinx Tested by: syrinx
* Add some statistics that are needed to support RFC4188 as part of the SoC2006thompsa2006-07-311-0/+43
| | | | | | work on a bridge monitoring module for BSNMP. Submitted by: shteryana (SoC 2006)
* Remove the dependency of bridgestp.h on if_bridgevar.h by moving a couple ofthompsa2006-07-271-48/+0
| | | | private structures to if_bridge.c.
* /tmp/cvsuusTrcthompsa2006-07-261-76/+2
|
* If we miss the LINK_UP event from the network interface then the bridge portthompsa2006-03-061-0/+1
| | | | | | | | | will remain in the disabled state until another link event happens in the future (if at all). Add a timer to periodically check the interface state and recover. Reported by: Nik Lam <freebsdnik j2d.lam.net.au> MFC after: 3 days
* Add code that clears certain capabilities from the member interface, these arethompsa2006-01-141-0/+1
| | | | | | | | | | | | | restored when its removed from the bridge. At the moment we only clear IFCAP_TXCSUM. Since a locally generated packet on the bridge may be sent out any one or more interfaces it cant be assumed that every card does hardware csums. Most bridges don't generate a lot of traffic themselves so turning off offloading won't hurt, bridged packets are unaffected. Tested by: Bruce Walker (bmw borderware.com) MFC after: 5 days
* Minor whitespace cleanup.thompsa2006-01-021-1/+1
|
* Change from a callback in if_ethersubr to using EVENTHANDLER in order to detachthompsa2005-12-171-1/+1
| | | | | | | span ports when they disappear. The span port does not have a pointer to the softc so revert r1.31 and bring back the softc linked-list. MFC after: 2 weeks
* Add support for creating span ports so that one can snoop bridged trafficthompsa2005-12-141-1/+5
| | | | | | | from another interface/machine/network. Obtained from: OpenBSD MFC after: 2 weeks
* Move the cloned interface list management in to if_clone. For some drivers thethompsa2005-11-081-1/+0
| | | | | | | | | | softc lists and associated mutex are now unused so these have been removed. Calling if_clone_detach() will now destroy all the cloned interfaces for the driver and in most cases is all thats needed to unload. Idea by: brooks Reviewed by: brooks
* Further clean up the bridge hooks in if_ethersubr.c and ng_ether.cthompsa2005-10-141-8/+22
| | | | | | - move the function pointer definitions to if_bridgevar.h - move most of the logic to the new BRIDGE_INPUT and BRIDGE_OUTPUT macros - remove unneeded functions from if_bridgevar.h and sort a little.
* - Previously when broadcasting to N number of interfaces we would run pfilthompsa2005-07-061-2/+1
| | | | | | | | | | | | | | | | | | | hooks for each outgoing interface but also run pfil hooks _N times_ on the bridge interface. This is changed so pfil hooks are run once for the bridge interface (bridge0) and then only on the outgoing interfaces in the broadcast loop. - Simplify bridge_enqueue() by moving bridge_pfil() to the callers. - Check (inet6_pfil_hook.ph_busy_count >= 0), it may be possible to have a packet filter hooked for only ipv6 but we were only checking if ipv4 hooks were busy. - Minor optimisation for null mbuf check after bridge_pfil(), move it into the if-block as it couldnt possibly be null outside. Prodded by: mlaier Approved by: re (scottl), mlaier (mentor)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Add dummynet(4) support to if_bridge, this code is largely based on bridge.c.thompsa2005-06-101-0/+1
| | | | | | | This is the final piece to match bridge.c in functionality, we can now be a drop-in replacement. Approved by: mlaier (mentor)
* Add if_bridge, which provides more advanced Ethernet bridging and 802.1dthompsa2005-06-051-0/+357
spanning tree support. Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R. Thorpe in NetBSD. Reviewed by: mlaier, bms, green Silence from: -net Approved by: mlaier (mentor) Obtained from: NetBSD
OpenPOWER on IntegriCloud