Răsfoiți Sursa

[SCTP]: Correctly set the length of sctp_assoc_change notification

sctp_assoc_change notification may contain the data from a received
ABORT chunk.  Set the length correctly to account for that.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Vlad Yasevich 17 ani în urmă
părinte
comite
b90a137d30
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      net/sctp/ulpevent.c

+ 1 - 1
net/sctp/ulpevent.c

@@ -206,7 +206,7 @@ struct sctp_ulpevent  *sctp_ulpevent_make_assoc_change(
 	 * This field is the total length of the notification data, including
 	 * the notification header.
 	 */
-	sac->sac_length = sizeof(struct sctp_assoc_change);
+	sac->sac_length = skb->len;
 
 	/* Socket Extensions for SCTP
 	 * 5.3.1.1 SCTP_ASSOC_CHANGE