Commit 7b11ba37 authored by Alex Elder's avatar Alex Elder Committed by Sage Weil

libceph: define CEPH_MSG_MAX_MIDDLE_LEN

This is probably unnecessary but the code read as if it were wrong
in read_partial_message().
Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent 4137577a
...@@ -66,6 +66,7 @@ struct ceph_options { ...@@ -66,6 +66,7 @@ struct ceph_options {
#define CEPH_OSD_IDLE_TTL_DEFAULT 60 #define CEPH_OSD_IDLE_TTL_DEFAULT 60
#define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024) #define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024)
#define CEPH_MSG_MAX_MIDDLE_LEN (16*1024*1024)
#define CEPH_MSG_MAX_DATA_LEN (16*1024*1024) #define CEPH_MSG_MAX_DATA_LEN (16*1024*1024)
#define CEPH_AUTH_NAME_DEFAULT "guest" #define CEPH_AUTH_NAME_DEFAULT "guest"
......
...@@ -1887,7 +1887,7 @@ static int read_partial_message(struct ceph_connection *con) ...@@ -1887,7 +1887,7 @@ static int read_partial_message(struct ceph_connection *con)
if (front_len > CEPH_MSG_MAX_FRONT_LEN) if (front_len > CEPH_MSG_MAX_FRONT_LEN)
return -EIO; return -EIO;
middle_len = le32_to_cpu(con->in_hdr.middle_len); middle_len = le32_to_cpu(con->in_hdr.middle_len);
if (middle_len > CEPH_MSG_MAX_DATA_LEN) if (middle_len > CEPH_MSG_MAX_MIDDLE_LEN)
return -EIO; return -EIO;
data_len = le32_to_cpu(con->in_hdr.data_len); data_len = le32_to_cpu(con->in_hdr.data_len);
if (data_len > CEPH_MSG_MAX_DATA_LEN) if (data_len > CEPH_MSG_MAX_DATA_LEN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment