diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-10-04 02:51:34 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:51:31 +0200 |
commit | bbd0d59809f923ea2b540cbd781b32110e249f6e (patch) | |
tree | 8a278cfa0e7bcc7b415e93baf6d1a93536efe17a /net/sctp/associola.c | |
parent | [SCTP]: Enable the sending of the AUTH chunk. (diff) | |
download | linux-bbd0d59809f923ea2b540cbd781b32110e249f6e.tar.xz linux-bbd0d59809f923ea2b540cbd781b32110e249f6e.zip |
[SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 3bdd8dcb76a7..03158e3665da 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -1011,6 +1011,16 @@ static void sctp_assoc_bh_rcv(struct work_struct *work) state = asoc->state; subtype = SCTP_ST_CHUNK(chunk->chunk_hdr->type); + /* SCTP-AUTH, Section 6.3: + * The receiver has a list of chunk types which it expects + * to be received only after an AUTH-chunk. This list has + * been sent to the peer during the association setup. It + * MUST silently discard these chunks if they are not placed + * after an AUTH chunk in the packet. + */ + if (sctp_auth_recv_cid(subtype.chunk, asoc) && !chunk->auth) + continue; + /* Remember where the last DATA chunk came from so we * know where to send the SACK. */ |