lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 18 Feb 2014 07:23:26 -0500 From: Neil Horman <nhorman@...driver.com> To: Xufeng Zhang <xufeng.zhang@...driver.com> Cc: vyasevich@...il.com, davem@...emloft.net, linux-sctp@...r.kernel.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH RFC] sctp: Update HEARTBEAT timer immediately after user changed HB.interval On Tue, Feb 18, 2014 at 01:56:50PM +0800, Xufeng Zhang wrote: > For an established association, if user has updated the HB.interval > parameter by setsockopt(), this new heartbeat interval will not > take effect until: > - the expiry of the heartbeat timer and new hearbeat is sent. > - DATA chunk has been sent and the transport resets the timer. > This could not meet the requirement of the user who need to > get HEARTBEAT sent at the specified time. > > Thus, we need to update the heartbeat timer immediately after > user has changed HB.interval. > > Signed-off-by: Xufeng Zhang <xufeng.zhang@...driver.com> Acked-by: Neil Horman <nhorman@...driver.com> > --- > net/sctp/socket.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/net/sctp/socket.c b/net/sctp/socket.c > index 9e91d6e..699ae1e 100644 > --- a/net/sctp/socket.c > +++ b/net/sctp/socket.c > @@ -2344,6 +2344,11 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params, > if (trans) { > trans->hbinterval = > msecs_to_jiffies(params->spp_hbinterval); > + > + /* Update the heartbeat timer immediately. */ > + if (!mod_timer(&trans->hb_timer, > + sctp_transport_timeout(trans))) > + sctp_transport_hold(trans); > } else if (asoc) { > asoc->hbinterval = > msecs_to_jiffies(params->spp_hbinterval); > -- > 1.7.0.2 > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists