diff --git a/lib/rofl_ofdpa_fm_driver.cpp b/lib/rofl_ofdpa_fm_driver.cpp index 54174a5..49aa73b 100644 --- a/lib/rofl_ofdpa_fm_driver.cpp +++ b/lib/rofl_ofdpa_fm_driver.cpp @@ -320,7 +320,8 @@ cofflowmod rofl_ofdpa_fm_driver::enable_tmac_ipv4_unicast_mac( if (in_port) fm.set_match().set_in_port(in_port); fm.set_match().set_eth_type(ETH_P_IP); - fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); + if (vid) + fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); fm.set_match().set_eth_dst(mac); fm.set_instructions().set_inst_goto_table().set_table_id( @@ -442,7 +443,8 @@ cofflowmod rofl_ofdpa_fm_driver::enable_tmac_ipv6_unicast_mac( if (in_port) fm.set_match().set_in_port(in_port); fm.set_match().set_eth_type(ETH_P_IPV6); - fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); + if (vid) + fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); fm.set_match().set_eth_dst(mac); fm.set_instructions().set_inst_goto_table().set_table_id( @@ -460,7 +462,7 @@ cofflowmod rofl_ofdpa_fm_driver::disable_tmac_ipv4_unicast_mac( cofflowmod fm(ofp_version); - fm.set_command(OFPFC_DELETE); + fm.set_command(OFPFC_DELETE_STRICT); fm.set_table_id(OFDPA_FLOW_TABLE_ID_TERMINATION_MAC); fm.set_priority(2); @@ -470,7 +472,8 @@ cofflowmod rofl_ofdpa_fm_driver::disable_tmac_ipv4_unicast_mac( if (in_port) fm.set_match().set_in_port(in_port); fm.set_match().set_eth_type(ETH_P_IP); - fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); + if (vid) + fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); fm.set_match().set_eth_dst(mac); DEBUG_LOG(": return flow-mod:" << std::endl << fm); @@ -485,7 +488,7 @@ cofflowmod rofl_ofdpa_fm_driver::disable_tmac_ipv6_unicast_mac( cofflowmod fm(ofp_version); - fm.set_command(OFPFC_DELETE); + fm.set_command(OFPFC_DELETE_STRICT); fm.set_table_id(OFDPA_FLOW_TABLE_ID_TERMINATION_MAC); fm.set_priority(2); @@ -495,7 +498,8 @@ cofflowmod rofl_ofdpa_fm_driver::disable_tmac_ipv6_unicast_mac( if (in_port) fm.set_match().set_in_port(in_port); fm.set_match().set_eth_type(ETH_P_IPV6); - fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); + if (vid) + fm.set_match().set_vlan_vid(vid | OFPVID_PRESENT); fm.set_match().set_eth_dst(mac); DEBUG_LOG(": return flow-mod:" << std::endl << fm);