git: kernel - More if_bridge work + misc fixes

看板DFBSD_commit作者時間15年前 (2011/02/22 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 4ee4f75304954a71220b5a900bae7f56a019ab5a Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Feb 21 16:02:30 2011 -0800 kernel - More if_bridge work + misc fixes * When bridging packets sent from one of our own MACs we always override the ether_shost in the output packet so it comes from the actual interface the packet is being sent out on. * LINK0 will still nominally keep the ether_shost intact when forwarding across a bridge, except in the above case. That is, any foreign MAC set as the source coming in on one interface will be retained as the source when being thrown out on another interface. But any local MAC will be replaced with the MAC of the outgoing interface. * When receiving a unicast frame on one interface which is targetted to another interface, retain the original rcvif for any vlan or arp processing. Otherwise (for example) if this were an ARP reply the ARP code would associate the reply with the wrong interface. We would want the ARP entry to be associated with the first interface, not the second, because the first interface is the one the reply actually came in on. * Adjust the ARP code in if_ether.c to use rcvif and not ifp, and don't log if non-matching interfaces are part of the same bridge (unless log_arp_wrong_iface is set to 2). * Augment the ether_reinput_cpu() API to pass additional flags in, allowing the caller to specify that m->m_pkthdr.rcvif not be overwritten. Used to support the above features. * Clear M_HASH in a few more cases in pf.c Summary of changes: sys/net/bridge/if_bridge.c | 114 +++++++++++++++++++++++++++----------------- sys/net/ethernet.h | 4 +- sys/net/if_ethersubr.c | 18 +++++-- sys/net/if_var.h | 4 ++ sys/net/pf/pf.c | 2 + sys/net/vlan/if_vlan.c | 2 +- sys/netinet/if_ether.c | 9 ++++ 7 files changed, 103 insertions(+), 50 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4ee4f75304954a71220b5a900bae7f56a019ab5a -- DragonFly BSD source repository
文章代碼(AID): #1DOmG7dg (DFBSD_commit)