Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41817
b: refs/heads/master
c: 9b1dfad
h: refs/heads/master
i:
  41815: 1efff23
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent e24a400 commit 65d47c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f235fca389f23cd6c9e0f466611bb2d6a05ae758
refs/heads/master: 9b1dfad011d409bc56476a81810342751645ee54
6 changes: 4 additions & 2 deletions trunk/net/sctp/sm_make_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,7 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep,
struct sk_buff *skb;
sctp_scope_t scope;
struct sctp_af *af;
union sctp_addr tmp;

/* Create the bare association. */
scope = sctp_scope(sctp_source(chunk));
Expand All @@ -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));
if (unlikely(!af))
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:
return asoc;

Expand Down Expand Up @@ -1439,7 +1441,7 @@ struct sctp_association *sctp_unpack_cookie(
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) {
*error = -SCTP_IERROR_BAD_PORTS;
goto fail;
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 65d47c2

Please sign in to comment.