NETVIRT-1146 : Exception IllegalArgumentException due to null subnet-id 44/69344/3
authoreupakir <kiran.n.upadhyaya@ericsson.com>
Sat, 10 Mar 2018 20:12:10 +0000 (01:42 +0530)
committerSam Hague <shague@redhat.com>
Sun, 11 Mar 2018 13:14:34 +0000 (13:14 +0000)
during extra-route vrf-entry deletion

A bug in one of the checks during extra-route creation was leading
to exceptions in the delete path.
Label-Mapper is a bgpvpn exclusive data-store and should not be populated
for router based interal-vpn adjacencies. Such a population lead to
iRT/eRT code execution during the delete extra route life-cycle for plain
router case, leading to this exception.

Change-Id: I9bbfcd55a56f64793a322c647ad63f60c2a8ca1a
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/populator/impl/L3vpnOverMplsGrePopulator.java

index e3572d374edd98ce4607b8a6339c6a828c14708a..9f0e56a10c83c4bebc2e7f159e1656724e2c8e82 100644 (file)
@@ -77,7 +77,7 @@ public class L3vpnOverMplsGrePopulator extends L3vpnPopulator {
         // Not advertising the prefix to BGP for InternalVpn (where rd is vpnName),
         // transparentInternetVpn (where rd is Network name)
         // and internalVpnForExtraRoute (where rd is DpnId)
-        if (VpnUtil.isEligibleForBgp(rd, input.getVpnName(), input.getDpnId(), input.getNetworkName())) {
+        if (VpnUtil.isEligibleForBgp(primaryRd, input.getVpnName(), input.getDpnId(), input.getNetworkName())) {
             // the DpnId is set as rd in case of extra routes present in router based VPN
             addToLabelMapper(label, input.getDpnId(), nextHopIpAddress,
                     Arrays.asList(nextHopIp), vpnId, input.getInterfaceName(), null,false,