From 34fc95a8574f5b8344e5c3b1000c9459517238c2 Mon Sep 17 00:00:00 2001 From: Madhu Venugopal Date: Tue, 10 Dec 2013 03:57:39 -0800 Subject: [PATCH] Fixing a recent breakage in Flow programmer introduced by https://git.opendaylight.org/gerrit/#/c/3493/ Change-Id: Ib93dc934ac1af7072bfd8db1a3bd51e01fcd8d73 Signed-off-by: Madhu Venugopal --- .../openflow/internal/FlowProgrammerService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.36.6