The code previously assumed that if the
list was present it would not be empty
resulting in the flawed conclusion that
the non-existant adjacency is of the
wrong IP version ;-)
Change-Id: I5ff8c4fc54a637cc02a3fe18e7c522183c869274
Signed-off-by: Josh <jhershbe@redhat.com>
List<Adjacency> adjacencies = vpnUtil.getAdjacenciesForVpnInterfaceFromConfig(srcInterface);
IpVersionChoice srcIpVersion = vpnUtil.getIpVersionFromString(srcIP.stringValue());
boolean isSrcIpVersionPartOfVpn = false;
- if (adjacencies != null) {
+ if (adjacencies != null && !adjacencies.isEmpty()) {
for (Adjacency adj : adjacencies) {
IpPrefix ipPrefix = IpPrefixBuilder.getDefaultInstance(adj.getIpAddress());
// If extra/static route is configured, we should ignore for learning process