Skip to content

Commit 1f4e803

Browse files
lxinkuba-moo
authored andcommitted
sctp: update hb timer immediately after users change hb_interval
Currently, when hb_interval is changed by users, it won't take effect until the next expiry of hb timer. As the default value is 30s, users have to wait up to 30s to wait its hb_interval update to work. This becomes pretty bad in containers where a much smaller value is usually set on hb_interval. This patch improves it by resetting the hb timer immediately once the value of hb_interval is updated by users. Note that we don't address the already existing 'problem' when sending a heartbeat 'on demand' if one hb has just been sent(from the timer) mentioned in: https://www.mail-archive.com/[email protected]/msg590224.html Signed-off-by: Xin Long <[email protected]> Reviewed-by: Simon Horman <[email protected]> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://lore.kernel.org/r/75465785f8ee5df2fb3acdca9b8fafdc18984098.1696172660.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2222a78 commit 1f4e803

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sctp/socket.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
24502450
if (trans) {
24512451
trans->hbinterval =
24522452
msecs_to_jiffies(params->spp_hbinterval);
2453+
sctp_transport_reset_hb_timer(trans);
24532454
} else if (asoc) {
24542455
asoc->hbinterval =
24552456
msecs_to_jiffies(params->spp_hbinterval);

0 commit comments

Comments
 (0)