70 likes | 232 Views
Create a bridge Add interface to bridge. net_bridge. net_bridge_fdb_entry. net_bridge_port. net_device. port. device. bridge. port. device. port. device. netif_receive_skb. ptype_all. handle_bridge. br_handle_frame_hook. ptype_base. loopback or dev->br_port == NULL. 和桥没关系.
E N D
Create a bridge • Add interface to bridge
net_bridge net_bridge_fdb_entry net_bridge_port net_device
port device bridge port device port device
netif_receive_skb ptype_all handle_bridge br_handle_frame_hook ptype_base
loopback or dev->br_port == NULL 和桥没关系 br_handle_frame_hook
yes port 的状态是disabled? no no src mac 正确? yes yes stp packet(bpdu)? br_stp_handle_bpdu no yes port的状态是learing or forwarding? br_handle_frame_finish no drop
yes no flood port 的状态是disabled? 找到了fdb? drop no yes to stack update src mac database fdb是本机mac? yes drop port 的状态是learning? br_forward no yes to stack port的设备是混杂模式? no to stack: skb->dev 是bridge yes to stack 目的mac是多播地址? no 查找mac学习表