From: Madhu Venugopal Date: Tue, 10 Dec 2013 11:57:39 +0000 (-0800) Subject: Fixing a recent breakage in Flow programmer introduced by https://git.opendaylight... X-Git-Tag: jenkins-controller-bulk-release-prepare-only-2-1~216^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=34fc95a8574f5b8344e5c3b1000c9459517238c2;hp=bb1a64b9181b790bdabc4a0861e8e49d8d9a8e1e Fixing a recent breakage in Flow programmer introduced by https://git.opendaylight.org/gerrit/#/c/3493/ Change-Id: Ib93dc934ac1af7072bfd8db1a3bd51e01fcd8d73 Signed-off-by: Madhu Venugopal --- diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java index 1a67c4c93f..e2fa8d5f1e 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java @@ -36,9 +36,9 @@ import org.opendaylight.controller.sal.flowprogrammer.Flow; import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService; import org.opendaylight.controller.sal.match.Match; import org.opendaylight.controller.sal.match.MatchType; +import org.opendaylight.controller.sal.utils.EtherTypes; import org.opendaylight.controller.sal.utils.GlobalConstants; import org.opendaylight.controller.sal.utils.HexEncode; -import org.opendaylight.controller.sal.utils.IPProtocols; import org.opendaylight.controller.sal.utils.NodeCreator; import org.opendaylight.controller.sal.utils.Status; import org.opendaylight.controller.sal.utils.StatusCode; @@ -270,8 +270,8 @@ public class FlowProgrammerService implements IPluginInFlowProgrammerService, private Status validateFlow(Flow flow) { Match m = flow.getMatch(); boolean isIPEthertypeSet = m.isPresent(MatchType.DL_TYPE) - && (m.getField(MatchType.DL_TYPE).getValue().equals(IPProtocols.IPV4.byteValue()) || m - .getField(MatchType.DL_TYPE).getValue().equals(IPProtocols.IPV6.byteValue())); + && (m.getField(MatchType.DL_TYPE).getValue().equals(EtherTypes.IPv4.shortValue()) || m + .getField(MatchType.DL_TYPE).getValue().equals(EtherTypes.IPv6.shortValue())); // network address check if ((m.isPresent(MatchType.NW_SRC) || m.isPresent(MatchType.NW_DST)) && !isIPEthertypeSet) {