+
+ // Check if peer is configured in registry before retrieving preferences
+ if (registry.isPeerConfigured(getRemoteIp()) == false) {
+ final BGPDocumentedException cause = new BGPDocumentedException(
+ "BGP peer with ip: " + getRemoteIp()
+ + " not configured, check configured peers in : "
+ + registry, BGPError.CEASE);
+ negotiationFailed(cause);
+ return;
+ }
+
+ final BGPSessionPreferences preferences = getPreferences();
+
+ int as = preferences.getMyAs().getValue().intValue();