Skip to content
Snippets Groups Projects
Commit c5f146db authored by Ryan Izard's avatar Ryan Izard
Browse files

Merge pull request #602 from mindi102680/master

Fix fromString of MatchUtils OFVlanVidMatch issue
parents 9ff45153 eb230896
No related branches found
No related tags found
No related merge requests found
......@@ -444,11 +444,11 @@ public class MatchUtils {
break;
case STR_DL_VLAN:
if (dataMask.length == 1) {
mb.setExact(MatchField.VLAN_VID, OFVlanVidMatch.ofVlan(dataMask[0].contains("0x") ? Integer.valueOf(dataMask[0].replaceFirst("0x", ""), 16) : Integer.valueOf(dataMask[0])));
mb.setExact(MatchField.VLAN_VID, OFVlanVidMatch.ofRawVid(dataMask[0].contains("0x") ? Short.valueOf(dataMask[0].replaceFirst("0x", ""), 16) : Short.valueOf(dataMask[0])));
} else {
mb.setMasked(MatchField.VLAN_VID, OFVlanVidMatchWithMask.of(
OFVlanVidMatch.ofVlan(dataMask[0].contains("0x") ? Integer.valueOf(dataMask[0].replaceFirst("0x", ""), 16) : Integer.valueOf(dataMask[0])),
OFVlanVidMatch.ofVlan(dataMask[1].contains("0x") ? Integer.valueOf(dataMask[1].replaceFirst("0x", ""), 16) : Integer.valueOf(dataMask[1]))));
OFVlanVidMatch.ofRawVid(dataMask[0].contains("0x") ? Short.valueOf(dataMask[0].replaceFirst("0x", ""), 16) : Short.valueOf(dataMask[0])),
OFVlanVidMatch.ofRawVid(dataMask[1].contains("0x") ? Short.valueOf(dataMask[1].replaceFirst("0x", ""), 16) : Short.valueOf(dataMask[1]))));
}
break;
case STR_DL_VLAN_PCP:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment