case OVS_ACTION_ATTR_PUSH_VLAN:
vlan = nl_attr_get(a);
- eth_push_vlan(packet, vlan->vlan_tci & ~htons(VLAN_CFI));
+ eth_push_vlan(packet, vlan->vlan_tci);
break;
case OVS_ACTION_ATTR_POP_VLAN:
}
if (flow->vlan_tci & htons(VLAN_CFI)) {
- eth_push_vlan(b, flow->vlan_tci & ~htons(VLAN_CFI));
+ eth_push_vlan(b, flow->vlan_tci);
}
if (flow->dl_type == htons(ETH_TYPE_IP)) {
}
/* Insert VLAN header according to given TCI. Packet passed must be Ethernet
- * packet.
+ * packet. Ignores the CFI bit of 'tci' using 0 instead.
*
* Also sets 'packet->l2' to point to the new Ethernet header. */
void
memcpy(tmp.veth_dst, eh->eth_dst, ETH_ADDR_LEN);
memcpy(tmp.veth_src, eh->eth_src, ETH_ADDR_LEN);
tmp.veth_type = htons(ETH_TYPE_VLAN);
- tmp.veth_tci = tci;
+ tmp.veth_tci = tci & htons(~VLAN_CFI);
tmp.veth_next_type = eh->eth_type;
veh = ofpbuf_push_uninit(packet, VLAN_HEADER_LEN);