Merge "Quickfix - Vlan-vid match entry"
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / util / MatchSerializer.java
index d4729f6b2aafc637ebaff08b625788e60a0cd8f9..bde832c0206aae3ab089da9dd8e00c51cbd5e56e 100644 (file)
@@ -187,9 +187,10 @@ public class MatchSerializer {
             fieldValue = 6;\r
             fieldValue = fieldValue << 1;\r
             VlanVidMatchEntry vlanVid = entry.getAugmentation(VlanVidMatchEntry.class);\r
-            int vlanVidValue = vlanVid.getVlanVid() << 1;\r
+            int vlanVidValue = vlanVid.getVlanVid();\r
             if (vlanVid.isCfiBit()) {\r
-                vlanVidValue = vlanVidValue | 1;\r
+                short cfi = 1 << 12; // 13-th bit\r
+                vlanVidValue = vlanVidValue | cfi;\r
             }\r
             if (entry.isHasMask()) {\r
                 fieldValue = fieldValue | 1;\r