diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2010-12-23 17:10:46 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2010-12-23 17:10:46 +0000 |
| commit | 3a6443553f9b2e8a4b2d96b04dba4dbee20408bd (patch) | |
| tree | 69b31d16bc4a88265109ab87f55527e5de912a41 /cpp/src/qpid | |
| parent | d65d192f2e98df2fa2e2fa1d4b97445b8f6117f4 (diff) | |
| download | qpid-python-3a6443553f9b2e8a4b2d96b04dba4dbee20408bd.tar.gz | |
Add in some useful rdma warnings when we reject a connection
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1052321 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/sys/rdma/RdmaIO.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/cpp/src/qpid/sys/rdma/RdmaIO.cpp index b356a48bf1..26f780726f 100644 --- a/cpp/src/qpid/sys/rdma/RdmaIO.cpp +++ b/cpp/src/qpid/sys/rdma/RdmaIO.cpp @@ -491,6 +491,7 @@ namespace Rdma { case RDMA_CM_EVENT_CONNECT_REQUEST: { // Make sure peer has sent params we can use if (!conn_param.private_data || conn_param.private_data_len < sizeof(NConnectionParams)) { + QPID_LOG(warning, "Rdma: rejecting connection attempt: unusable connection parameters"); id->reject(); break; } @@ -499,7 +500,14 @@ namespace Rdma { ConnectionParams cp = *rcp; // Reject if requested msg size is bigger than we allow - if (cp.maxRecvBufferSize > checkConnectionParams.maxRecvBufferSize) { + if ( + cp.maxRecvBufferSize > checkConnectionParams.maxRecvBufferSize || + cp.initialXmitCredit > checkConnectionParams.initialXmitCredit + ) { + QPID_LOG(warning, "Rdma: rejecting connection attempt: connection parameters out of range: (" + << cp.maxRecvBufferSize << ">" << checkConnectionParams.maxRecvBufferSize << " || " + << cp.initialXmitCredit << ">" << checkConnectionParams.initialXmitCredit + << ")"); id->reject(&checkConnectionParams); break; } @@ -514,6 +522,7 @@ namespace Rdma { id->accept(conn_param, rcp); } else { // Reject connection + QPID_LOG(warning, "Rdma: rejecting connection attempt: application policy"); id->reject(); } break; |
