Handling the case where vlan priority is set to 0.
[controller.git] / opendaylight / protocol_plugins / openflow / src / main / java / org / opendaylight / controller / protocol_plugin / openflow / internal / FlowConverter.java
index 78a2ea5120da60ad09053efb894e039533c52d68..6d1c563aa44729581b5eb46b5e61f8cb0543b47a 100644 (file)
@@ -539,7 +539,7 @@ public class FlowConverter {
                         salMatch.setField(new MatchField(MatchType.DL_VLAN,
                                 vlan));
                     }
-                    if (ofMatch.getDataLayerVirtualLanPriorityCodePoint() != 0) {
+                    if ((ofMatch.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) {
                         salMatch.setField(MatchType.DL_VLAN_PR, ofMatch
                                 .getDataLayerVirtualLanPriorityCodePoint());
                     }
@@ -612,7 +612,7 @@ public class FlowConverter {
                         salMatch.setField(new MatchField(MatchType.DL_VLAN,
                                 vlan));
                     }
-                    if (v6Match.getDataLayerVirtualLanPriorityCodePoint() != 0) {
+                    if ((v6Match.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) {
                         salMatch.setField(MatchType.DL_VLAN_PR, v6Match
                                 .getDataLayerVirtualLanPriorityCodePoint());
                     }