Commit 49a1f4d4 authored by David S. Miller's avatar David S. Miller

Merge nuts.davemloft.net:/disk1/BK/network-2.6

into nuts.davemloft.net:/disk1/BK/net-2.6
parents 08faf52b d95263f5
...@@ -56,12 +56,12 @@ static int chksum_setkey(void *ctx, const u8 *key, unsigned int keylen, ...@@ -56,12 +56,12 @@ static int chksum_setkey(void *ctx, const u8 *key, unsigned int keylen,
return 0; return 0;
} }
static void chksum_update(void *ctx, const u8 *data, size_t length) static void chksum_update(void *ctx, const u8 *data, unsigned int length)
{ {
struct chksum_ctx *mctx = ctx; struct chksum_ctx *mctx = ctx;
u32 mcrc; u32 mcrc;
mcrc = crc32c(mctx->crc, data, length); mcrc = crc32c(mctx->crc, data, (size_t)length);
mctx->crc = mcrc; mctx->crc = mcrc;
} }
......
...@@ -1056,7 +1056,9 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack) ...@@ -1056,7 +1056,9 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
} }
/* Get the highest TSN in the sack. */ /* Get the highest TSN in the sack. */
highest_tsn = sack_ctsn + highest_tsn = sack_ctsn;
if (sack->num_gap_ack_blocks)
highest_tsn +=
ntohs(frags[ntohs(sack->num_gap_ack_blocks) - 1].gab.end); ntohs(frags[ntohs(sack->num_gap_ack_blocks) - 1].gab.end);
if (TSN_lt(asoc->highest_sacked, highest_tsn)) { if (TSN_lt(asoc->highest_sacked, highest_tsn)) {
......
...@@ -77,7 +77,7 @@ struct sctp_ulpevent *sctp_ulpevent_new(int size, int msg_flags, int gfp) ...@@ -77,7 +77,7 @@ struct sctp_ulpevent *sctp_ulpevent_new(int size, int msg_flags, int gfp)
/* Initialize an ULP event from an given skb. */ /* Initialize an ULP event from an given skb. */
void sctp_ulpevent_init(struct sctp_ulpevent *event, int msg_flags) void sctp_ulpevent_init(struct sctp_ulpevent *event, int msg_flags)
{ {
memset(event, sizeof(struct sctp_ulpevent), 0x00); memset(event, 0, sizeof(struct sctp_ulpevent));
event->msg_flags = msg_flags; event->msg_flags = msg_flags;
} }
......
...@@ -79,7 +79,7 @@ struct sctp_ulpq *sctp_ulpq_new(struct sctp_association *asoc, int gfp) ...@@ -79,7 +79,7 @@ struct sctp_ulpq *sctp_ulpq_new(struct sctp_association *asoc, int gfp)
struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *ulpq, struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *ulpq,
struct sctp_association *asoc) struct sctp_association *asoc)
{ {
memset(ulpq, sizeof(struct sctp_ulpq), 0x00); memset(ulpq, 0, sizeof(struct sctp_ulpq));
ulpq->asoc = asoc; ulpq->asoc = asoc;
skb_queue_head_init(&ulpq->reasm); skb_queue_head_init(&ulpq->reasm);
......
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