]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix erroneous inc of snmp SctpFragUsrMsgs
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Wed, 20 Jun 2018 15:47:52 +0000 (12:47 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Jun 2018 03:49:33 +0000 (12:49 +0900)
commit83056c6f2e43155026a702f508945c42d727c4c0
tree4a9114717845d1a3e835cdc386b80ceee4c13e36
parent6d93b45dcc15b283787287940c5585ef09c8d47b
sctp: fix erroneous inc of snmp SctpFragUsrMsgs

Currently it is incrementing SctpFragUsrMsgs when the user message size
is of the exactly same size as the maximum fragment size, which is wrong.

The fix is to increment it only when user message is bigger than the
maximum fragment size.

Fixes: 2d17c2cb0f17 ("sctp: refactor sctp_datamsg_from_user")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/chunk.c