diff options
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/sm_statefuns.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 177528ed3e1b..385f1757158a 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -5176,7 +5176,22 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc | |||
5176 | * association exists, otherwise, use the peer's vtag. | 5176 | * association exists, otherwise, use the peer's vtag. |
5177 | */ | 5177 | */ |
5178 | if (asoc) { | 5178 | if (asoc) { |
5179 | vtag = asoc->peer.i.init_tag; | 5179 | /* Special case the INIT-ACK as there is no peer's vtag |
5180 | * yet. | ||
5181 | */ | ||
5182 | switch(chunk->chunk_hdr->type) { | ||
5183 | case SCTP_CID_INIT_ACK: | ||
5184 | { | ||
5185 | sctp_initack_chunk_t *initack; | ||
5186 | |||
5187 | initack = (sctp_initack_chunk_t *)chunk->chunk_hdr; | ||
5188 | vtag = ntohl(initack->init_hdr.init_tag); | ||
5189 | break; | ||
5190 | } | ||
5191 | default: | ||
5192 | vtag = asoc->peer.i.init_tag; | ||
5193 | break; | ||
5194 | } | ||
5180 | } else { | 5195 | } else { |
5181 | /* Special case the INIT and stale COOKIE_ECHO as there is no | 5196 | /* Special case the INIT and stale COOKIE_ECHO as there is no |
5182 | * vtag yet. | 5197 | * vtag yet. |