diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2011-04-19 17:31:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-20 04:51:05 -0400 |
commit | 92c73af58e9f1b487322ce25a7a67889c9d91343 (patch) | |
tree | e15fe97de52dfade4956a5c6378f16ddde0d0c7c /net/sctp/sm_statefuns.c | |
parent | de6becdc0844ff92b38ffd9f0c4db1d3de02835f (diff) |
sctp: make heartbeat information in sctp_make_heartbeat()
Make heartbeat information in sctp_make_heartbeat() instead
of make it in sctp_sf_heartbeat() directly for common using.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index ab949320468d..736847e44e7e 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -941,18 +941,9 @@ static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep, | |||
941 | { | 941 | { |
942 | struct sctp_transport *transport = (struct sctp_transport *) arg; | 942 | struct sctp_transport *transport = (struct sctp_transport *) arg; |
943 | struct sctp_chunk *reply; | 943 | struct sctp_chunk *reply; |
944 | sctp_sender_hb_info_t hbinfo; | ||
945 | size_t paylen = 0; | ||
946 | |||
947 | hbinfo.param_hdr.type = SCTP_PARAM_HEARTBEAT_INFO; | ||
948 | hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t)); | ||
949 | hbinfo.daddr = transport->ipaddr; | ||
950 | hbinfo.sent_at = jiffies; | ||
951 | hbinfo.hb_nonce = transport->hb_nonce; | ||
952 | 944 | ||
953 | /* Send a heartbeat to our peer. */ | 945 | /* Send a heartbeat to our peer. */ |
954 | paylen = sizeof(sctp_sender_hb_info_t); | 946 | reply = sctp_make_heartbeat(asoc, transport); |
955 | reply = sctp_make_heartbeat(asoc, transport, &hbinfo, paylen); | ||
956 | if (!reply) | 947 | if (!reply) |
957 | return SCTP_DISPOSITION_NOMEM; | 948 | return SCTP_DISPOSITION_NOMEM; |
958 | 949 | ||