mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
SCTP: Use net_ratelimit to suppress error messages print too fast
When multi bundling SHUTDOWN-ACK message is received in ESTAB state, this will cause "sctp protocol violation state" message print many times. If SHUTDOWN-ACK is bundled 300 times in one packet, message will be print 300 times. The same problem also exists when received unexpected HEARTBEAT-ACK message which is bundled message times. This patch used net_ratelimit() to suppress error messages print too fast. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
This commit is contained in:
parent
00f1c2df2a
commit
d99fa42963
2 changed files with 17 additions and 14 deletions
|
@ -1013,8 +1013,9 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
|
|||
break;
|
||||
|
||||
case SCTP_DISPOSITION_VIOLATION:
|
||||
printk(KERN_ERR "sctp protocol violation state %d "
|
||||
"chunkid %d\n", state, subtype.chunk);
|
||||
if (net_ratelimit())
|
||||
printk(KERN_ERR "sctp protocol violation state %d "
|
||||
"chunkid %d\n", state, subtype.chunk);
|
||||
break;
|
||||
|
||||
case SCTP_DISPOSITION_NOT_IMPL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue