BGPCEP-748: Fix AFI/SAFI 79/67479/2
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Tue, 23 Jan 2018 09:01:22 +0000 (10:01 +0100)
committerClaudio David Gasparini <claudio.gasparini@pantheon.tech>
Sun, 25 Feb 2018 09:15:03 +0000 (09:15 +0000)
peer support registration when old-school BGP-4
is used.

Change-Id: I2137ea2647f01fb87bad04e682fe0bf5541768e8
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPPeer.java

index 0f6696b9145622f139bb615fac00cb1a34f6777a..2b4224b4c26870834712e13027efee684f24018a 100644 (file)
@@ -373,6 +373,11 @@ public class BGPPeer extends BGPPeerStateImpl implements BGPSessionListener, Pee
         final TablesKey key = new TablesKey(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
         if (this.tables.add(key) && !announceNone) {
             createAdjRibOutListener(peerId, key, false);
+            final ExportPolicyPeerTracker exportTracker = this.rib.getExportPolicyPeerTracker(key);
+            if (exportTracker != null) {
+                this.tableRegistration.add(exportTracker.registerPeer(peerId,  null, this.peerIId,
+                        this.peerRole, this.simpleRoutingPolicy));
+            }
         }
     }