aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:07:25 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:38 -0500
commit63de08f45bb73a445edb482850f4cdccd84def48 (patch)
tree1fe446890d6baa7634466ec7109c92520b0bccf3 /net/sctp
parentbe29681edfbad72167df735e243e8621840dca4f (diff)
[SCTP]: Switch address inside the heartbeat opaque data to net-endian.
Its only use happens on the same host, when it gets quoted back to us. So we are free to flip to net-endian and avoid extra PITA. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_statefuns.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 7d722f5a31d7..0848309773a5 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -852,7 +852,7 @@ static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep,
852 852
853 hbinfo.param_hdr.type = SCTP_PARAM_HEARTBEAT_INFO; 853 hbinfo.param_hdr.type = SCTP_PARAM_HEARTBEAT_INFO;
854 hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t)); 854 hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t));
855 hbinfo.daddr = transport->ipaddr_h; 855 hbinfo.daddr = transport->ipaddr;
856 hbinfo.sent_at = jiffies; 856 hbinfo.sent_at = jiffies;
857 hbinfo.hb_nonce = transport->hb_nonce; 857 hbinfo.hb_nonce = transport->hb_nonce;
858 858
@@ -1018,7 +1018,6 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1018 struct sctp_transport *link; 1018 struct sctp_transport *link;
1019 sctp_sender_hb_info_t *hbinfo; 1019 sctp_sender_hb_info_t *hbinfo;
1020 unsigned long max_interval; 1020 unsigned long max_interval;
1021 union sctp_addr tmp;
1022 1021
1023 if (!sctp_vtag_verify(chunk, asoc)) 1022 if (!sctp_vtag_verify(chunk, asoc))
1024 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 1023 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
@@ -1036,8 +1035,7 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1036 } 1035 }
1037 1036
1038 from_addr = hbinfo->daddr; 1037 from_addr = hbinfo->daddr;
1039 flip_to_n(&tmp, &from_addr); 1038 link = sctp_assoc_lookup_paddr(asoc, &from_addr);
1040 link = sctp_assoc_lookup_paddr(asoc, &tmp);
1041 1039
1042 /* This should never happen, but lets log it if so. */ 1040 /* This should never happen, but lets log it if so. */
1043 if (unlikely(!link)) { 1041 if (unlikely(!link)) {