Fix confusing peer AS message 35/22235/1
authorRobert Varga <rovarga@cisco.com>
Tue, 9 Jun 2015 20:30:19 +0000 (22:30 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 9 Jun 2015 20:30:19 +0000 (22:30 +0200)
We printed the expected number in place of what the peer sent and vice
versa, confusing users. Fix that.

Change-Id: I874a25598818e58f4a05a10a977724b0cc853140
Signed-off-by: Robert Varga <rovarga@cisco.com>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/StrictBGPPeerRegistry.java

index fa21bbfbe74ba553710d64305efc3d75296f03d7..57afa27e02ada4643bffa69a0e8299caf8cb485a 100644 (file)
@@ -149,7 +149,7 @@ public final class StrictBGPPeerRegistry implements BGPPeerRegistry {
             }
         } else {
             if (!getPeerPreferences(ip).getMyAs().equals(asNumber)) {
-                LOG.warn("Unexpected remote AS number. Expecting {}, got {}", asNumber, getPeerPreferences(ip).getMyAs());
+                LOG.warn("Unexpected remote AS number. Expecting {}, got {}", getPeerPreferences(ip).getMyAs(), asNumber);
                 throw new BGPDocumentedException("Peer AS number mismatch", BGPError.BAD_PEER_AS);
             }
         }