diff options
Diffstat (limited to 'net/sctp/input.c')
| -rw-r--r-- | net/sctp/input.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 64f630102532..6d82f400d13c 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
| @@ -135,6 +135,9 @@ int sctp_rcv(struct sk_buff *skb) | |||
| 135 | 135 | ||
| 136 | SCTP_INC_STATS_BH(SCTP_MIB_INSCTPPACKS); | 136 | SCTP_INC_STATS_BH(SCTP_MIB_INSCTPPACKS); |
| 137 | 137 | ||
| 138 | if (skb_linearize(skb)) | ||
| 139 | goto discard_it; | ||
| 140 | |||
| 138 | sh = (struct sctphdr *) skb->h.raw; | 141 | sh = (struct sctphdr *) skb->h.raw; |
| 139 | 142 | ||
| 140 | /* Pull up the IP and SCTP headers. */ | 143 | /* Pull up the IP and SCTP headers. */ |
| @@ -768,6 +771,9 @@ static void __sctp_hash_established(struct sctp_association *asoc) | |||
| 768 | /* Add an association to the hash. Local BH-safe. */ | 771 | /* Add an association to the hash. Local BH-safe. */ |
| 769 | void sctp_hash_established(struct sctp_association *asoc) | 772 | void sctp_hash_established(struct sctp_association *asoc) |
| 770 | { | 773 | { |
| 774 | if (asoc->temp) | ||
| 775 | return; | ||
| 776 | |||
| 771 | sctp_local_bh_disable(); | 777 | sctp_local_bh_disable(); |
| 772 | __sctp_hash_established(asoc); | 778 | __sctp_hash_established(asoc); |
| 773 | sctp_local_bh_enable(); | 779 | sctp_local_bh_enable(); |
| @@ -801,6 +807,9 @@ static void __sctp_unhash_established(struct sctp_association *asoc) | |||
| 801 | /* Remove association from the hash table. Local BH-safe. */ | 807 | /* Remove association from the hash table. Local BH-safe. */ |
| 802 | void sctp_unhash_established(struct sctp_association *asoc) | 808 | void sctp_unhash_established(struct sctp_association *asoc) |
| 803 | { | 809 | { |
| 810 | if (asoc->temp) | ||
| 811 | return; | ||
| 812 | |||
| 804 | sctp_local_bh_disable(); | 813 | sctp_local_bh_disable(); |
| 805 | __sctp_unhash_established(asoc); | 814 | __sctp_unhash_established(asoc); |
| 806 | sctp_local_bh_enable(); | 815 | sctp_local_bh_enable(); |
