aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro2006-11-20 17:07:25 -0800
committerDavid S. Miller2006-12-02 21:26:38 -0800
commit63de08f45bb73a445edb482850f4cdccd84def48 (patch)
tree1fe446890d6baa7634466ec7109c92520b0bccf3
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>
-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,
hbinfo.param_hdr.type = SCTP_PARAM_HEARTBEAT_INFO;
hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t));
- hbinfo.daddr = transport->ipaddr_h;
+ hbinfo.daddr = transport->ipaddr;
hbinfo.sent_at = jiffies;
hbinfo.hb_nonce = transport->hb_nonce;
@@ -1018,7 +1018,6 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
struct sctp_transport *link;
sctp_sender_hb_info_t *hbinfo;
unsigned long max_interval;
- union sctp_addr tmp;
if (!sctp_vtag_verify(chunk, asoc))
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,
}
from_addr = hbinfo->daddr;
- flip_to_n(&tmp, &from_addr);
- link = sctp_assoc_lookup_paddr(asoc, &tmp);
+ link = sctp_assoc_lookup_paddr(asoc, &from_addr);
/* This should never happen, but lets log it if so. */
if (unlikely(!link)) {