diff options
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 483dcd71b3c5..01e002430c85 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -758,6 +758,12 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, | |||
758 | struct sctp_chunk auth; | 758 | struct sctp_chunk auth; |
759 | sctp_ierror_t ret; | 759 | sctp_ierror_t ret; |
760 | 760 | ||
761 | /* Make sure that we and the peer are AUTH capable */ | ||
762 | if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) { | ||
763 | sctp_association_free(new_asoc); | ||
764 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | ||
765 | } | ||
766 | |||
761 | /* set-up our fake chunk so that we can process it */ | 767 | /* set-up our fake chunk so that we can process it */ |
762 | auth.skb = chunk->auth_chunk; | 768 | auth.skb = chunk->auth_chunk; |
763 | auth.asoc = chunk->asoc; | 769 | auth.asoc = chunk->asoc; |
@@ -768,10 +774,6 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, | |||
768 | auth.transport = chunk->transport; | 774 | auth.transport = chunk->transport; |
769 | 775 | ||
770 | ret = sctp_sf_authenticate(net, ep, new_asoc, type, &auth); | 776 | ret = sctp_sf_authenticate(net, ep, new_asoc, type, &auth); |
771 | |||
772 | /* We can now safely free the auth_chunk clone */ | ||
773 | kfree_skb(chunk->auth_chunk); | ||
774 | |||
775 | if (ret != SCTP_IERROR_NO_ERROR) { | 777 | if (ret != SCTP_IERROR_NO_ERROR) { |
776 | sctp_association_free(new_asoc); | 778 | sctp_association_free(new_asoc); |
777 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | 779 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); |
@@ -6176,7 +6178,7 @@ static int sctp_eat_data(const struct sctp_association *asoc, | |||
6176 | * PMTU. In cases, such as loopback, this might be a rather | 6178 | * PMTU. In cases, such as loopback, this might be a rather |
6177 | * large spill over. | 6179 | * large spill over. |
6178 | */ | 6180 | */ |
6179 | if ((!chunk->data_accepted) && (!asoc->rwnd || asoc->rwnd_over || | 6181 | if ((!chunk->data_accepted) && (!asoc->rwnd || |
6180 | (datalen > asoc->rwnd + asoc->frag_point))) { | 6182 | (datalen > asoc->rwnd + asoc->frag_point))) { |
6181 | 6183 | ||
6182 | /* If this is the next TSN, consider reneging to make | 6184 | /* If this is the next TSN, consider reneging to make |