]> bbs.cooldavid.org Git - net-next-2.6.git/commit
dccp ccid-2: Separate option parsing from CCID processing
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 14 Nov 2010 16:26:13 +0000 (17:26 +0100)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Mon, 15 Nov 2010 06:12:01 +0000 (07:12 +0100)
commit7e87fe84303cc54ecf3c7b688cb08ca24322a41d
treedf764cbfefe19e628e92a8353d331d91c33212b6
parent52394eecec4e6fa677a61af26f0bd35de665344e
dccp ccid-2: Separate option parsing from CCID processing

This patch replaces an almost identical replication of code: large parts
of dccp_parse_options() re-appeared as ccid2_ackvector() in ccid2.c.

Apart from the duplication, this caused two more problems:
 1. CCIDs should not need to be concerned with parsing header options;
 2. one can not assume that Ack Vectors appear as a contiguous area within an
    skb, it is legal to insert other options and/or padding in between. The
    current code would throw an error and stop reading in such a case.

Since Ack Vectors provide CCID-specific information, they are now processed
by the CCID directly, separating this functionality from the main DCCP code.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
net/dccp/ackvec.c
net/dccp/ackvec.h
net/dccp/ccids/ccid2.c
net/dccp/ccids/ccid2.h
net/dccp/options.c