vlan2, mac2 -> interface2 vlan3, mac1 -> interface1 and so on. When gif interface receives EtherIP encapsulating 802.1Q packet it does not set m->m_pkthdr.ether_vtag and m->m_flags |= M_VLANTAG. Chain: ether<->if_bridge<->gif<->gif<->if_bridge<->ether transmits vlan tagged packets properly, but if_bridge bridge stores all MAC addresses learned from gif side in vlan1. In point-to-multipoint environment unicast 802.1Q (vlan_tag != 1) packets received from physical ethernet interface will be always sent over all gif interfaces attached to if_bridge. Fix: Patch attached. Not sure about proper place. After patching vlan MACs stored properly and bridge woriking right. Not tested too much. Patch attached with submission follows: How-To-Repeat: Simple, but need a lot of equipment. = | em0 +------+ em1 fxp0 +-------+ +--------+ CPE1 +-----------+ HOST1 | | $ip1 +------+ +-------+ | | em0 +------+ em1 fxp0 +-------+ +--------+ CPE2 +-----------+ HOST2 | | $ip3 +------+ +-------+ | | em0 +------+ em1 fxp0 +-------+ +--------+ CPE3 +-----------| HOST3 | | $ip3 +------+ +-------+ = CPE1: ifconfig bridge0 create; ifconfig em1 up; ifconfig bridge0 addm em1 up ifconfig gif2 create; ifconfig gif2 tunnel $ip1 $ip2 ifconfig bridge0 addm gif2; ifconfig bridge0 private gif2 ifconfig gif3 create; ifconfig gif3 tunnel $ip1 $ip3 ifconfig bridge0 addm gif3; ifconfig bridge0 private gif3 CPE2: ifconfig bridge0 create ifconfig em1 up; ifconfig bridge0 addm1 up ifconfig gif1 create; ifconfig gif1 tunnel $ip2 $ip1 ifconfig bridge0 addm gif1; ifconfig bridge0 private gif1 ifconfig gif3 create; ifconfig gif3 tunnel $ip2 $ip3 ifconfig bridge0 addm gif3; ifconfig bridge0 private gif3 CPE3: ifconfig bridge0 create ifconfig em1 up; ifconfig bridge0 addm1 up ifconfig gif1 create; ifconfig gif1 tunnel $ip3 $ip1 ifconfig bridge0 addm gif1; ifconfig bridge0 private gif1 ifconfig gif2 create; ifconfig gif2 tunnel $ip3 $ip2 ifconfig bridge0 addm gif2; ifconfig bridge0 private gif2 =================================================================== With plain 802.1 ethernet all works fine (thanks for private flag). No extra traffic, no loops. Almost poor man's VPLS. But after: HOST1: ifconfig fxp0 up ifconfig vlan5 create ifconfig vlan5 10.10.10.1/24 vlan 5 vlandev fxp0 HOST2: ifconfig fxp0 up ifconfig vlan5 create ifconfig vlan5 10.10.10.2/24 vlan 5 vlandev fxp0 ping 10.10.10.1 CPE2 will send all icmp requests received on em1 over gif1 and gif3 [waste] CPE1 will sens all icmp replies received on em0 over gif2 and gif3 [waste] CPE3 will receive icmp requests on gif2 and replies on gif1 and send all packets to em1.
Responsible Changed From-To: freebsd-bugs->freebsd-net Over to maintainer(s).
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>