use the right hop for more than one sf
[netvirt.git] / openstack / net-virt-sfc / impl / src / main / java / org / opendaylight / netvirt / openstack / netvirt / sfc / workaround / NetvirtSfcWorkaroundOF13Provider.java
index 5ea5f020435be32d40a8ed1698b64cd57c5ed545..0e28f97e9543bb903b0c567346f3f93368d0697d 100644 (file)
@@ -204,10 +204,10 @@ public class NetvirtSfcWorkaroundOF13Provider implements INetvirtSfcOF13Provider
                 }
 
                 ServiceFunction serviceFunction =
-                        SfcProviderServiceFunctionAPI.readServiceFunction(firstHop.getServiceFunctionName());
+                        SfcProviderServiceFunctionAPI.readServiceFunction(hop.getServiceFunctionName());
                 if (serviceFunction == null) {
                     LOG.warn("handleRenderedServicePath: Could not identify ServiceFunction {} on {}",
-                            firstHop.getServiceFunctionName().getValue(), bridgeNode);
+                            hop.getServiceFunctionName().getValue(), bridgeNode);
                     continue;
                 }
                 ServiceFunctionForwarder serviceFunctionForwarder =
@@ -215,7 +215,7 @@ public class NetvirtSfcWorkaroundOF13Provider implements INetvirtSfcOF13Provider
                                 .readServiceFunctionForwarder(hop.getServiceFunctionForwarder());
                 if (serviceFunctionForwarder == null) {
                     LOG.warn("handleRenderedServicePath: Could not identify ServiceFunctionForwarder {} on {}",
-                            firstHop.getServiceFunctionName().getValue(), bridgeNode);
+                            hop.getServiceFunctionName().getValue(), bridgeNode);
                     continue;
                 }