summaryrefslogtreecommitdiffstats
path: root/sys/net/bridgestp.c
Commit message (Collapse)AuthorAgeFilesLines
* Add the module version to fix the loading with if_bridge.thompsa2006-08-121-0/+1
| | | | | Reported by: keramida Tested by: keramida
* Fix style in the last commit, the variable declaration goes at the top of thethompsa2006-08-021-1/+2
| | | | function.
* Add a callback so we can notify the parent bridge that a port state change hasthompsa2006-08-021-3/+34
| | | | | occured, we need to do this from a taskqueue to avoid a LOR with the if_bridge mutex.
* Be sure to disable the port when removing it from STP.thompsa2006-08-021-0/+2
|
* Add some statistics that are needed to support RFC4188 as part of the SoC2006thompsa2006-07-311-0/+10
| | | | | | work on a bridge monitoring module for BSNMP. Submitted by: shteryana (SoC 2006)
* /tmp/cvsuusTrcthompsa2006-07-261-561/+631
|
* If we miss the LINK_UP event from the network interface then the bridge portthompsa2006-03-061-13/+10
| | | | | | | | | 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
* Fix up the Bridge Identifier field in the BPDU packet.thompsa2006-02-281-15/+30
| | | | | | | | | | - use the cu_bridge_id rather than the cu_rootid for the bridge address [1] - the memcmp return value is not signed so the wrong interface may have been selected - fix up the calculation of sc_bridge_id PR: kern/93909 [1] MFC after: 3 days
* Minor whitespace cleanup.thompsa2005-12-171-1/+1
|
* Change most of the bridge and stp funtions to static. This has highlightedthompsa2005-10-141-99/+112
| | | | | | | | | | | that the following funtions are not used, wrap in '#ifdef noused' for the moment. bstp_enable_change_detection bstp_disable_change_detection bstp_set_bridge_priority bstp_set_port_priority bstp_set_path_cost
* Further clean up the bridge hooks in if_ethersubr.c and ng_ether.cthompsa2005-10-141-1/+0
| | | | | | - 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.
* Do not unconditionally set a spanning tree port to forwarding as the link may bethompsa2005-10-111-1/+1
| | | | | | down when we attach. We wont get updated until a linkstate change happens. Go via bstp_ifupdstatus() which checks the media status first.
* Mark the callouts as MPSAFE as if_bridge has been giant-free since day 1.thompsa2005-08-181-3/+1
| | | | | | | Use the SMP friendly callout_init_mtx() while we are here. Approved by: mlaier (mentor) MFC after: 3 days
* Ensure that we are holding the lock when initialising the bridge interface. Wethompsa2005-08-151-0/+2
| | | | | | | | | | | | could initialise while unlocked if the bridge is not up when setting the inet address, ether_ioctl() would call bridge_init. Change it so bridge_init is always called unlocked and then locks before calling bstp_initialization(). Reported by: Michal Mertl Approved by: mlaier (mentor) MFC after: 3 days
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-3/+3
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* - Previously when broadcasting to N number of interfaces we would run pfilthompsa2005-07-061-2/+2
| | | | | | | | | | | | | | | | | | | 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-3/+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 if_bridge, which provides more advanced Ethernet bridging and 802.1dthompsa2005-06-051-0/+1174
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