Loading net/sctp/sm_make_chunk.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -1227,6 +1227,7 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, struct sk_buff *skb; struct sk_buff *skb; sctp_scope_t scope; sctp_scope_t scope; struct sctp_af *af; struct sctp_af *af; union sctp_addr tmp; /* Create the bare association. */ /* Create the bare association. */ scope = sctp_scope(sctp_source(chunk)); scope = sctp_scope(sctp_source(chunk)); Loading @@ -1239,7 +1240,8 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, af = sctp_get_af_specific(ipver2af(skb->nh.iph->version)); af = sctp_get_af_specific(ipver2af(skb->nh.iph->version)); if (unlikely(!af)) if (unlikely(!af)) goto fail; goto fail; af->from_skb(&asoc->c.peer_addr, skb, 1); af->from_skb(&tmp, skb, 1); flip_to_n(&asoc->c.peer_addr, &tmp); nodata: nodata: return asoc; return asoc; Loading Loading @@ -1439,7 +1441,7 @@ struct sctp_association *sctp_unpack_cookie( goto fail; goto fail; } } if (ntohs(chunk->sctp_hdr->source) != bear_cookie->peer_addr.v4.sin_port || if (chunk->sctp_hdr->source != bear_cookie->peer_addr.v4.sin_port || ntohs(chunk->sctp_hdr->dest) != bear_cookie->my_port) { ntohs(chunk->sctp_hdr->dest) != bear_cookie->my_port) { *error = -SCTP_IERROR_BAD_PORTS; *error = -SCTP_IERROR_BAD_PORTS; goto fail; goto fail; Loading net/sctp/sm_statefuns.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -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; struct sctp_ulpevent *ev, *ai_ev = NULL; int error = 0; int error = 0; struct sctp_chunk *err_chk_p; struct sctp_chunk *err_chk_p; union sctp_addr tmp; /* If the packet is an OOTB packet which is temporarily on the /* If the packet is an OOTB packet which is temporarily on the * control endpoint, respond with an ABORT. * control endpoint, respond with an ABORT. Loading Loading @@ -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]; 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, if (!sctp_process_init(new_asoc, chunk->chunk_hdr->type, &chunk->subh.cookie_hdr->c.peer_addr, &tmp, peer_init, GFP_ATOMIC)) peer_init, GFP_ATOMIC)) goto nomem_init; goto nomem_init; Loading Loading
net/sctp/sm_make_chunk.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -1227,6 +1227,7 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, struct sk_buff *skb; struct sk_buff *skb; sctp_scope_t scope; sctp_scope_t scope; struct sctp_af *af; struct sctp_af *af; union sctp_addr tmp; /* Create the bare association. */ /* Create the bare association. */ scope = sctp_scope(sctp_source(chunk)); scope = sctp_scope(sctp_source(chunk)); Loading @@ -1239,7 +1240,8 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, af = sctp_get_af_specific(ipver2af(skb->nh.iph->version)); af = sctp_get_af_specific(ipver2af(skb->nh.iph->version)); if (unlikely(!af)) if (unlikely(!af)) goto fail; goto fail; af->from_skb(&asoc->c.peer_addr, skb, 1); af->from_skb(&tmp, skb, 1); flip_to_n(&asoc->c.peer_addr, &tmp); nodata: nodata: return asoc; return asoc; Loading Loading @@ -1439,7 +1441,7 @@ struct sctp_association *sctp_unpack_cookie( goto fail; goto fail; } } if (ntohs(chunk->sctp_hdr->source) != bear_cookie->peer_addr.v4.sin_port || if (chunk->sctp_hdr->source != bear_cookie->peer_addr.v4.sin_port || ntohs(chunk->sctp_hdr->dest) != bear_cookie->my_port) { ntohs(chunk->sctp_hdr->dest) != bear_cookie->my_port) { *error = -SCTP_IERROR_BAD_PORTS; *error = -SCTP_IERROR_BAD_PORTS; goto fail; goto fail; Loading
net/sctp/sm_statefuns.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -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; struct sctp_ulpevent *ev, *ai_ev = NULL; int error = 0; int error = 0; struct sctp_chunk *err_chk_p; struct sctp_chunk *err_chk_p; union sctp_addr tmp; /* If the packet is an OOTB packet which is temporarily on the /* If the packet is an OOTB packet which is temporarily on the * control endpoint, respond with an ABORT. * control endpoint, respond with an ABORT. Loading Loading @@ -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]; 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, if (!sctp_process_init(new_asoc, chunk->chunk_hdr->type, &chunk->subh.cookie_hdr->c.peer_addr, &tmp, peer_init, GFP_ATOMIC)) peer_init, GFP_ATOMIC)) goto nomem_init; goto nomem_init; Loading