#
ef64cd19 |
| 22-Sep-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Fix an alignment panic my preserving the 2byte padding (ETHER_ALIGN) on our copied mbuf, which keeps the IP header 32-bit aligned. This copied mbuf is reinjected back into ether_input and off to the
Fix an alignment panic my preserving the 2byte padding (ETHER_ALIGN) on our copied mbuf, which keeps the IP header 32-bit aligned. This copied mbuf is reinjected back into ether_input and off to the IP routines.
Reported and tested by: Peter van Dijk Approved by: mlaier (mentor) MFC after: 3 days
show more ...
|
#
59280079 |
| 06-Sep-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Add support for multicast to the bridge and allow inet6 addresses to be assigned to the interface.
IPv6 auto-configuration is disabled. An IPv6 link-local address has a link-local scope within one l
Add support for multicast to the bridge and allow inet6 addresses to be assigned to the interface.
IPv6 auto-configuration is disabled. An IPv6 link-local address has a link-local scope within one link, the spec is unclear for the bridge case and it may cause scope violation.
An address can be assigned in the usual way; ifconfig bridge0 inet6 xxxx:...
Tested by: bmah Reviewed by: ume (netinet6) Approved by: mlaier (mentor) MFC after: 1 week
show more ...
|
#
68e84b98 |
| 27-Aug-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Fix a panic in softclock() if the interface is destroyed with a bpf consumer attached.
This is caused by bpf_detachd clearing IFF_PROMISC on the interface which does a SIOCSIFFLAGS ioctl. The proble
Fix a panic in softclock() if the interface is destroyed with a bpf consumer attached.
This is caused by bpf_detachd clearing IFF_PROMISC on the interface which does a SIOCSIFFLAGS ioctl. The problem here is that while the interface has been stopped, IFF_UP has not been cleared so IFF_UP != IFF_DRV_RUNNING, this causes the ioctl function to init() the interface which resets the callouts.
The destroy then completes and frees the softc but softclock will panic on a dead callout pointer.
Ensure ifp->if_flags matches reality by clearing IFF_UP when we destroy.
Silence from: rwatson Approved by: mlaier (mentor) MFC after: 3 days
show more ...
|
#
dba31bde |
| 23-Aug-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
The mtu check in bridge_enqueue is bogus as the maximum Ethernet frame is actually 1514, so comparing the mbuf length which includes the Ethernet header to the interface MTU is wrong.
The check was
The mtu check in bridge_enqueue is bogus as the maximum Ethernet frame is actually 1514, so comparing the mbuf length which includes the Ethernet header to the interface MTU is wrong.
The check was a little over the top so just remove it.
Approved by: mlaier (mentor) MFC after: 3 days
show more ...
|
#
23e76431 |
| 18-Aug-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Mark the callouts as MPSAFE as if_bridge has been giant-free since day 1.
Use the SMP friendly callout_init_mtx() while we are here.
Approved by: mlaier (mentor) MFC after: 3 days
|
#
a1c0fd4d |
| 15-Aug-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Ensure that we are holding the lock when initialising the bridge interface. We could initialise while unlocked if the bridge is not up when setting the inet address, ether_ioctl() would call bridge_i
Ensure that we are holding the lock when initialising the bridge interface. We 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
show more ...
|
#
13f4c340 |
| 09-Aug-2005 |
Robert Watson <rwatson@FreeBSD.org> |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchron
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 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
show more ...
|
#
3155122e |
| 09-Aug-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Use m_copypacket() which is an optimization of the common case m_copym(m, 0, M_COPYALL, how).
This is required for strict alignment architectures where we align the IP header in the input path but m
Use m_copypacket() which is an optimization of the common case m_copym(m, 0, M_COPYALL, how).
This is required for strict alignment architectures where we align the IP header in the input path but m_copym() will create an unaligned copy in bridge_broadcast(). m_copypacket() preserves alignment of the first mbuf.
Noticed by: Petri Simolin Approved by: mlaier (mentor) MFC after: 3 days
show more ...
|
#
39bb2fca |
| 25-Jul-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
We check that all the member interfaces have the same MTU on attach to the bridge but the interface can still be changed afterwards.
This falls under the 'dont do that' category but log an warning w
We check that all the member interfaces have the same MTU on attach to the bridge but the interface can still be changed afterwards.
This falls under the 'dont do that' category but log an warning when INVARIANTS is defined.
Approved by: mlaier (mentor) MFC after: 3 days
show more ...
|
#
12b47243 |
| 20-Jul-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Clear the PROMISC flag from the vlan interface when we remove a member. We checked for IFT_L2VLAN in bridge_ioctl_add() but not bridge_delete_member().
Approved by: mlaier (mentor)
|
#
489fc225 |
| 13-Jul-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Previously the bridge MTU was set to ETHERMTU and could not be changed. Since we can only bridge interfaces with the same value it meant that all members had to be set at ETHERMTU as well.
Allow the
Previously the bridge MTU was set to ETHERMTU and could not be changed. Since we can only bridge interfaces with the same value it meant that all members had to be set at ETHERMTU as well.
Allow the first member to be added to define the MTU for the bridge, the check still applies to all additional members.
Print an informative message if the MTU is incorrect [1]
Requested by: Niki Denev [1] Approved by: mlaier (mentor) MFC after: 3 days
show more ...
|
#
ea32e732 |
| 06-Jul-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
- Previously when broadcasting to N number of interfaces we would run pfil hooks for each outgoing interface but also run pfil hooks _N times_ on the bridge interface. This is changed so pfil hoo
- Previously when broadcasting to N number of interfaces we would run pfil 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)
show more ...
|
#
2fcb030a |
| 03-Jul-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Check the alignment of the IP header before passing the packet up to the packet filter. This would cause a panic on architectures that require strict alignment such as sparc64 (tier1) and ia64/ppc (t
Check the alignment of the IP header before passing the packet up to the packet filter. This would cause a panic on architectures that require strict alignment such as sparc64 (tier1) and ia64/ppc (tier2).
This adds two new macros that check the alignment, these are compile time dependent on __NO_STRICT_ALIGNMENT which is set for i386 and amd64 where alignment isn't need so the cost is avoided.
IP_HDR_ALIGNED_P() IP6_HDR_ALIGNED_P()
Move bridge_ip_checkbasic()/bridge_ip6_checkbasic() up so that the alignment is checked for ipfw and dummynet too.
PR: ia64/81284 Obtained from: NetBSD Approved by: re (dwhite), mlaier (mentor)
show more ...
|
#
49808fa4 |
| 29-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Sync if_bridge to NetBSD r1.31
Rename conflicting variables when handling SNAP Ethernet frames.
Obtained from: NetBSD Approved by: mlaier (mentor) Approved by: re (blanket)
|
#
ca6c404c |
| 27-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Fix a panic when bringing up the bridge interface. We were casting a ifnet pointer to a softc which is no longer valid since the ifnet struct was split out from the softc.
Approved by: mlaier (mento
Fix a panic when bringing up the bridge interface. We were casting a ifnet pointer to a softc which is no longer valid since the ifnet struct was split out from the softc.
Approved by: mlaier (mentor) Approved by: re (blanket)
show more ...
|
#
e7acea82 |
| 11-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Catch up with the struct ifnet changes and use if_alloc().
Reviewed by: brooks Approved by: mlaier (mentor)
|
#
fc74a9f9 |
| 10-Jun-2005 |
Brooks Davis <brooks@FreeBSD.org> |
Stop embedding struct ifnet at the top of driver softcs. Instead the 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 c
Stop embedding struct ifnet at the top of driver softcs. Instead the 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
show more ...
|
#
2c67c57c |
| 10-Jun-2005 |
Max Laier <mlaier@FreeBSD.org> |
Add missing {} in last commit.
|
#
c8b01292 |
| 10-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Add dummynet(4) support to if_bridge, this code is largely based on bridge.c.
This is the final piece to match bridge.c in functionality, we can now be a drop-in replacement.
Approved by: mlaier (m
Add dummynet(4) support to if_bridge, this code is largely based on bridge.c.
This is the final piece to match bridge.c in functionality, we can now be a drop-in replacement.
Approved by: mlaier (mentor)
show more ...
|
#
82116c33 |
| 07-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Bring in IPFW layer2 filtering from bridge.c, this allows Ethernet filtering using the layer2, mac and mac-type keywords.
This is one of the last features that bridge.c has over if_bridge and gets u
Bring in IPFW layer2 filtering from bridge.c, this allows Ethernet filtering using the layer2, mac and mac-type keywords.
This is one of the last features that bridge.c has over if_bridge and gets us very close to a full functional replacement.
Approved by: mlaier (mentor)
show more ...
|
#
f2999b2f |
| 06-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Change ipv6 packet filtering to match ipv4. It now checks pfil_member and pfil_bridge to determine which interfaces to filter on.
Approved by: mlaier (mentor)
|
#
31997bf2 |
| 05-Jun-2005 |
Andrew Thompson <thompsa@FreeBSD.org> |
Add if_bridge, which provides more advanced Ethernet bridging and 802.1d spanning tree support.
Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R. Thorpe in NetBSD.
Review
Add if_bridge, which provides more advanced Ethernet bridging and 802.1d 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
show more ...
|