- The packet log needs to copy all of the buffer not to the end.
This commit is contained in:
parent
7e990b09e2
commit
19d8ca2eaf
@ -513,10 +513,11 @@ sctp_copy_out_packet_log(uint8_t * target, int length)
|
||||
lenat = (int *)target;
|
||||
*lenat = packet_log_end;
|
||||
lenat++;
|
||||
this_copy = min((length - sizeof(int)), packet_log_end);
|
||||
this_copy = min((length - sizeof(int)), SCTP_PACKET_LOG_SIZE);
|
||||
memcpy((void *)lenat, (void *)packet_log_buffer, this_copy);
|
||||
if (SCTP_PKTLOG_WRITERS_NEED_LOCK) {
|
||||
atomic_subtract_int(&packet_log_writers, SCTP_PKTLOG_WRITERS_NEED_LOCK);
|
||||
atomic_subtract_int(&packet_log_writers,
|
||||
SCTP_PKTLOG_WRITERS_NEED_LOCK);
|
||||
}
|
||||
SCTP_IP_PKTLOG_UNLOCK();
|
||||
return (this_copy + sizeof(int));
|
||||
|
Loading…
Reference in New Issue
Block a user