import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
import org.opendaylight.protocol.bgp.rib.spi.entry.ActualBestPathRoutes;
import org.opendaylight.protocol.bgp.rib.spi.entry.AdvertizedRoute;
-import org.opendaylight.protocol.bgp.rib.spi.entry.RouteKeyIdentifier;
import org.opendaylight.protocol.bgp.rib.spi.entry.RouteEntryDependenciesContainer;
+import org.opendaylight.protocol.bgp.rib.spi.entry.RouteKeyIdentifier;
import org.opendaylight.protocol.bgp.rib.spi.entry.StaleBestPathRoute;
import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRibRoutingPolicy;
import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRouteEntryExportParameters;
R extends Route & ChildOf<? super S> & Identifiable<I>,
I extends Identifier<R>> void initializeRibOut(
final RouteEntryDependenciesContainer entryDep,
- List<ActualBestPathRoutes<C, S, R, I>> routesToStore) {
+ final List<ActualBestPathRoutes<C, S, R, I>> routesToStore) {
if (this.bindingChain == null) {
LOG.debug("Session closed, skip changes to peer AdjRibsOut {}", getPeerId());
return;
for(final ActualBestPathRoutes<C,S,R,I> initializingRoute :routesToStore) {
final PeerId fromPeerId = initializingRoute.getFromPeerId();
final Peer fromPeer = entryDep.getPeerTracker().getPeer(fromPeerId);
- if (!filterRoutes(fromPeerId, ribSupport.getTablesKey())) {
+ if (fromPeer == null || !filterRoutes(fromPeerId, ribSupport.getTablesKey())) {
continue;
}
final R route = initializingRoute.getRoute();
public final synchronized <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
R extends Route & ChildOf<? super S> & Identifiable<I>,
I extends Identifier<R>> void refreshRibOut(final RouteEntryDependenciesContainer entryDep,
- final List<StaleBestPathRoute<C, S, R, I>> staleRoutes, List<AdvertizedRoute<C, S, R, I>> newRoutes) {
+ final List<StaleBestPathRoute<C, S, R, I>> staleRoutes, final List<AdvertizedRoute<C, S, R, I>> newRoutes) {
if (this.bindingChain == null) {
LOG.debug("Session closed, skip changes to peer AdjRibsOut {}", getPeerId());
return;
}, MoreExecutors.directExecutor());
}
+ @Override
public final synchronized <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
R extends Route & ChildOf<? super S> & Identifiable<I>,
I extends Identifier<R>> void reEvaluateAdvertizement(
final RouteEntryDependenciesContainer entryDep,
- List<ActualBestPathRoutes<C, S, R, I>> routesToStore) {
+ final List<ActualBestPathRoutes<C, S, R, I>> routesToStore) {
if (this.bindingChain == null) {
LOG.debug("Session closed, skip changes to peer AdjRibsOut {}", getPeerId());
return;
for (final AdvertizedRoute<C,S,R,I> advRoute:routes) {
final PeerId fromPeerId = advRoute.getFromPeerId();
- if (!filterRoutes(fromPeerId, tk) || (!advRoute.isFirstBestPath() && !addPathSupported)) {
+ if (!filterRoutes(fromPeerId, tk) || !advRoute.isFirstBestPath() && !addPathSupported) {
continue;
}
final R route = advRoute.getRoute();