[SCTP]: Switch sctp_cookie ->peer_addr to net-endian.
[deliverable/linux.git] / net / sctp / sm_statefuns.c
index ac776fd206673fda28cf16bd9df834ee691666c5..174acc3c55268561f90ad797bd0570c8e6e94631 100644 (file)
@@ -598,6 +598,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
        struct sctp_ulpevent *ev, *ai_ev = NULL;
        int error = 0;
        struct sctp_chunk *err_chk_p;
+       union sctp_addr tmp;
 
        /* If the packet is an OOTB packet which is temporarily on the
         * control endpoint, respond with an ABORT.
@@ -665,8 +666,9 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
         */
        peer_init = &chunk->subh.cookie_hdr->c.peer_init[0];
 
+       flip_to_h(&tmp, &chunk->subh.cookie_hdr->c.peer_addr);
        if (!sctp_process_init(new_asoc, chunk->chunk_hdr->type,
-                              &chunk->subh.cookie_hdr->c.peer_addr,
+                              &tmp,
                               peer_init, GFP_ATOMIC))
                goto nomem_init;
 
@@ -852,7 +854,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;
 
This page took 0.034796 seconds and 5 git commands to generate.