diff options
Diffstat (limited to 'net/sctp/chunk.c')
| -rw-r--r-- | net/sctp/chunk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 8e4320040f05..476caaf100ed 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | #include <linux/net.h> | 42 | #include <linux/net.h> |
| 43 | #include <linux/inet.h> | 43 | #include <linux/inet.h> |
| 44 | #include <linux/skbuff.h> | 44 | #include <linux/skbuff.h> |
| 45 | #include <linux/slab.h> | ||
| 45 | #include <net/sock.h> | 46 | #include <net/sock.h> |
| 46 | #include <net/sctp/sctp.h> | 47 | #include <net/sctp/sctp.h> |
| 47 | #include <net/sctp/sm.h> | 48 | #include <net/sctp/sm.h> |
| @@ -57,9 +58,9 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg) | |||
| 57 | msg->send_failed = 0; | 58 | msg->send_failed = 0; |
| 58 | msg->send_error = 0; | 59 | msg->send_error = 0; |
| 59 | msg->can_abandon = 0; | 60 | msg->can_abandon = 0; |
| 61 | msg->can_delay = 1; | ||
| 60 | msg->expires_at = 0; | 62 | msg->expires_at = 0; |
| 61 | INIT_LIST_HEAD(&msg->chunks); | 63 | INIT_LIST_HEAD(&msg->chunks); |
| 62 | msg->msg_size = 0; | ||
| 63 | } | 64 | } |
| 64 | 65 | ||
| 65 | /* Allocate and initialize datamsg. */ | 66 | /* Allocate and initialize datamsg. */ |
| @@ -156,7 +157,6 @@ static void sctp_datamsg_assign(struct sctp_datamsg *msg, struct sctp_chunk *chu | |||
| 156 | { | 157 | { |
| 157 | sctp_datamsg_hold(msg); | 158 | sctp_datamsg_hold(msg); |
| 158 | chunk->msg = msg; | 159 | chunk->msg = msg; |
| 159 | msg->msg_size += chunk->skb->len; | ||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | 162 | ||
| @@ -246,6 +246,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, | |||
| 246 | if (msg_len >= first_len) { | 246 | if (msg_len >= first_len) { |
| 247 | msg_len -= first_len; | 247 | msg_len -= first_len; |
| 248 | whole = 1; | 248 | whole = 1; |
| 249 | msg->can_delay = 0; | ||
| 249 | } | 250 | } |
| 250 | 251 | ||
| 251 | /* How many full sized? How many bytes leftover? */ | 252 | /* How many full sized? How many bytes leftover? */ |
