- List<OvsdbTerminationPointAugmentation> intfs = southbound.getTerminationPointsOfBridge(node);
- for (OvsdbTerminationPointAugmentation tunIntf : intfs) {
- if (tunIntf.getName().equals(getTunnelName(tunnelType, dst))) {
- long tunnelOFPort = southbound.getOFPort(tunIntf);
- if (tunnelOFPort == 0) {
- logger.error("programTunnelRules: Could not Identify Tunnel port {} -> OF ({}) on {}",
- tunIntf.getName(), tunnelOFPort, node);
- return;
- }
- logger.debug("programTunnelRules: Identified Tunnel port {} -> OF ({}) on {}",
- tunIntf.getName(), tunnelOFPort, node);
+ OvsdbTerminationPointAugmentation tunnelPort= southbound.getTerminationPointsOfBridge(node,getTunnelName(tunnelType, dst));
+ if(tunnelPort != null){
+ long tunnelOFPort = southbound.getOFPort(tunnelPort);
+ if (tunnelOFPort == 0) {
+ logger.error("programTunnelRules: Could not Identify Tunnel port {} -> OF ({}) on {}",
+ tunnelPort.getName(), tunnelOFPort, node);
+ return;
+ }
+ logger.debug("programTunnelRules: Identified Tunnel port {} -> OF ({}) on {}",
+ tunnelPort.getName(), tunnelOFPort, node);
+
+ if (!local) {
+ logger.trace("programTunnelRules: program remote egress tunnel rules: node {}, intf {}",
+ node.getNodeId().getValue(), intf.getName());
+ programRemoteEgressTunnelBridgeRules(node, dpid, segmentationId, attachedMac,
+ tunnelOFPort, localPort);
+ }