diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
| -rw-r--r-- | net/sctp/sm_make_chunk.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index f4ac6c592e13..d05c57664e36 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
| @@ -495,7 +495,10 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | |||
| 495 | * | 495 | * |
| 496 | * [INIT ACK back to where the INIT came from.] | 496 | * [INIT ACK back to where the INIT came from.] |
| 497 | */ | 497 | */ |
| 498 | retval->transport = chunk->transport; | 498 | if (chunk->transport) |
| 499 | retval->transport = | ||
| 500 | sctp_assoc_lookup_paddr(asoc, | ||
| 501 | &chunk->transport->ipaddr); | ||
| 499 | 502 | ||
| 500 | retval->subh.init_hdr = | 503 | retval->subh.init_hdr = |
| 501 | sctp_addto_chunk(retval, sizeof(initack), &initack); | 504 | sctp_addto_chunk(retval, sizeof(initack), &initack); |
| @@ -642,8 +645,10 @@ struct sctp_chunk *sctp_make_cookie_ack(const struct sctp_association *asoc, | |||
| 642 | * | 645 | * |
| 643 | * [COOKIE ACK back to where the COOKIE ECHO came from.] | 646 | * [COOKIE ACK back to where the COOKIE ECHO came from.] |
| 644 | */ | 647 | */ |
| 645 | if (retval && chunk) | 648 | if (retval && chunk && chunk->transport) |
| 646 | retval->transport = chunk->transport; | 649 | retval->transport = |
| 650 | sctp_assoc_lookup_paddr(asoc, | ||
| 651 | &chunk->transport->ipaddr); | ||
| 647 | 652 | ||
| 648 | return retval; | 653 | return retval; |
| 649 | } | 654 | } |
