Change BGP to use bgp-id type and as-number type
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / StrictBGPPeerRegistry.java
index e096b2633c5b81d7d71a674236880c88dcdb90c4..ad2008a9311115aae5cff48eaf9eb8f88846335b 100644 (file)
@@ -176,7 +176,7 @@ public final class StrictBGPPeerRegistry implements BGPPeerRegistry {
         }
 
         // https://tools.ietf.org/html/rfc6286#section-2.2
-        if (openObj.getBgpIdentifier() != null && openObj.getBgpIdentifier().equals(localPref.getBgpId())) {
+        if (openObj.getBgpIdentifier() != null && openObj.getBgpIdentifier().getValue().equals(localPref.getBgpId().getValue())) {
             LOG.warn("Remote and local BGP Identifiers are the same: {}", openObj.getBgpIdentifier());
             throw new BGPDocumentedException("Remote and local BGP Identifiers are the same.", BGPError.BAD_BGP_ID);
         }