Defect fixes (cherry picked from master)
Change-Id: Icba699c84194170143c54e249af6317003ecdfc6
Showing
4 changed files
with
12 additions
and
12 deletions
| ... | @@ -286,17 +286,17 @@ public final class BasicPceccHandler { | ... | @@ -286,17 +286,17 @@ public final class BasicPceccHandler { |
| 286 | PortNumber inPort = lspLocalLabelInfo.inPort(); | 286 | PortNumber inPort = lspLocalLabelInfo.inPort(); |
| 287 | PortNumber outPort = lspLocalLabelInfo.outPort(); | 287 | PortNumber outPort = lspLocalLabelInfo.outPort(); |
| 288 | 288 | ||
| 289 | + if ((outLabelId != null) && (outPort != null)) { | ||
| 290 | + installLocalLabelRule(deviceId, outLabelId, outPort, tunnel.tunnelId(), false, | ||
| 291 | + Long.valueOf(LabelType.OUT_LABEL.value), Objective.Operation.REMOVE); | ||
| 292 | + } | ||
| 293 | + | ||
| 289 | // Push into device | 294 | // Push into device |
| 290 | if ((inLabelId != null) && (inPort != null)) { | 295 | if ((inLabelId != null) && (inPort != null)) { |
| 291 | installLocalLabelRule(deviceId, inLabelId, inPort, tunnel.tunnelId(), false, | 296 | installLocalLabelRule(deviceId, inLabelId, inPort, tunnel.tunnelId(), false, |
| 292 | Long.valueOf(LabelType.IN_LABEL.value), Objective.Operation.REMOVE); | 297 | Long.valueOf(LabelType.IN_LABEL.value), Objective.Operation.REMOVE); |
| 293 | } | 298 | } |
| 294 | 299 | ||
| 295 | - if ((outLabelId != null) && (outPort != null)) { | ||
| 296 | - installLocalLabelRule(deviceId, outLabelId, outPort, tunnel.tunnelId(), false, | ||
| 297 | - Long.valueOf(LabelType.OUT_LABEL.value), Objective.Operation.REMOVE); | ||
| 298 | - } | ||
| 299 | - | ||
| 300 | // List is stored from egress to ingress. So, using IN label id to release. | 300 | // List is stored from egress to ingress. So, using IN label id to release. |
| 301 | // Only one local label is assigned to device (destination node) | 301 | // Only one local label is assigned to device (destination node) |
| 302 | // and that is used as OUT label for source node. | 302 | // and that is used as OUT label for source node. | ... | ... |
| ... | @@ -844,16 +844,17 @@ public class PceManager implements PceService { | ... | @@ -844,16 +844,17 @@ public class PceManager implements PceService { |
| 844 | } | 844 | } |
| 845 | } | 845 | } |
| 846 | 846 | ||
| 847 | - if (isLinkShared) { | ||
| 848 | - releaseSharedBandwidth(newTunnel, tunnel); | ||
| 849 | - return; | ||
| 850 | - } | ||
| 851 | - | ||
| 852 | PceccTunnelInfo tunnelInfo = pceStore.getTunnelInfo(tunnel.tunnelId()); | 847 | PceccTunnelInfo tunnelInfo = pceStore.getTunnelInfo(tunnel.tunnelId()); |
| 853 | if (tunnelInfo == null || tunnelInfo.tunnelConsumerId() == null) { | 848 | if (tunnelInfo == null || tunnelInfo.tunnelConsumerId() == null) { |
| 854 | //If bandwidth for old tunnel is not allocated i,e 0 then no need to release | 849 | //If bandwidth for old tunnel is not allocated i,e 0 then no need to release |
| 855 | return; | 850 | return; |
| 856 | } | 851 | } |
| 852 | + | ||
| 853 | + if (isLinkShared) { | ||
| 854 | + releaseSharedBandwidth(newTunnel, tunnel); | ||
| 855 | + return; | ||
| 856 | + } | ||
| 857 | + | ||
| 857 | resourceService.release(tunnelInfo.tunnelConsumerId()); | 858 | resourceService.release(tunnelInfo.tunnelConsumerId()); |
| 858 | return; | 859 | return; |
| 859 | 860 | ... | ... |
| ... | @@ -479,7 +479,7 @@ public class PcepClientControllerImpl implements PcepClientController { | ... | @@ -479,7 +479,7 @@ public class PcepClientControllerImpl implements PcepClientController { |
| 479 | } else if (pathNameTlv != null) { | 479 | } else if (pathNameTlv != null) { |
| 480 | tunnel = preSyncLspDbByName.get(Arrays.toString(pathNameTlv.getValue())); | 480 | tunnel = preSyncLspDbByName.get(Arrays.toString(pathNameTlv.getValue())); |
| 481 | if (tunnel != null) { | 481 | if (tunnel != null) { |
| 482 | - preSyncLspDbByName.remove(tunnel.tunnelName()); | 482 | + preSyncLspDbByName.remove(tunnel.tunnelName().value()); |
| 483 | } | 483 | } |
| 484 | } | 484 | } |
| 485 | 485 | ... | ... |
| ... | @@ -366,7 +366,6 @@ public class PcepLspObjectVer1 implements PcepLspObject { | ... | @@ -366,7 +366,6 @@ public class PcepLspObjectVer1 implements PcepLspObject { |
| 366 | default: | 366 | default: |
| 367 | // Skip the unknown TLV. | 367 | // Skip the unknown TLV. |
| 368 | cb.skipBytes(hLength); | 368 | cb.skipBytes(hLength); |
| 369 | - tlv = null; | ||
| 370 | log.info("Received unsupported TLV type :" + hType + " in LSP object."); | 369 | log.info("Received unsupported TLV type :" + hType + " in LSP object."); |
| 371 | } | 370 | } |
| 372 | // Check for the padding | 371 | // Check for the padding | ... | ... |
-
Please register or login to post a comment