• Gerrit Renker's avatar
    dccp ccid-3: No more CCID control blocks in LISTEN state · 51c22bb5
    Gerrit Renker authored
    The CCIDs are activated as last of the features, at the end of the handshake,
    were the LISTEN state of the master socket is inherited into the server
    state of the child socket. Thus, the only states visible to CCIDs now are
    OPEN/PARTOPEN, and the closing states.
    
    This allows to remove tests which were previously necessary to protect
    against referencing a socket in the listening state (in CCID-3), but which
    now have become redundant.
    
    As a further byproduct of enabling the CCIDs only after the connection has been
    fully established, several typecast-initialisations of ccid3_hc_{rx,tx}_sock
    can now be eliminated:
     * the CCID is loaded, so it is not necessary to test if it is NULL,
     * if it is possible to load a CCID and leave the private area NULL, then this
        is a bug, which should crash loudly - and earlier,
     * the test for state==OPEN || state==PARTOPEN now reduces only to the closing
       phase (e.g. when the node has received an unexpected Reset).
    Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
    Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    51c22bb5
ccid3.c 26.6 KB