Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sctp: count data bundling sack chunk for outctrlchunks

Now all ctrl chunks are counted for asoc stats.octrlchunks and net
SCTP_MIB_OUTCTRLCHUNKS either after queuing up or bundling, other
than the chunk maked and bundled in sctp_packet_bundle_sack, which
caused 'outctrlchunks' not consistent with 'inctrlchunks' in peer.

This issue exists since very beginning, here to fix it by increasing
both net SCTP_MIB_OUTCTRLCHUNKS and asoc stats.octrlchunks when sack
chunk is maked and bundled in sctp_packet_bundle_sack.

Reported-by: Ja Ram Jeon <jajeon@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Xin Long and committed by
David S. Miller
7af03301 9fae5418

+3
+3
net/sctp/output.c
··· 282 282 sctp_chunk_free(sack); 283 283 goto out; 284 284 } 285 + SCTP_INC_STATS(sock_net(asoc->base.sk), 286 + SCTP_MIB_OUTCTRLCHUNKS); 287 + asoc->stats.octrlchunks++; 285 288 asoc->peer.sack_needed = 0; 286 289 if (del_timer(timer)) 287 290 sctp_association_put(asoc);