• Tuong Lien's avatar
    tipc: enable creating a "preliminary" node · 4cbf8ac2
    Tuong Lien authored
    When user sets RX key for a peer not existing on the own node, a new
    node entry is needed to which the RX key will be attached. However,
    since the peer node address (& capabilities) is unknown at that moment,
    only the node-ID is provided, this commit allows the creation of a node
    with only the data that we call as “preliminary”.
    
    A preliminary node is not the object of the “tipc_node_find()” but the
    “tipc_node_find_by_id()”. Once the first message i.e. LINK_CONFIG comes
    from that peer, and is successfully decrypted by the own node, the
    actual peer node data will be properly updated and the node will
    function as usual.
    
    In addition, the node timer always starts when a node object is created
    so if a preliminary node is not used, it will be cleaned up.
    
    The later encryption functions will also use the node timer and be able
    to create a preliminary node automatically when needed.
    Acked-by: default avatarYing Xue <ying.xue@windreiver.com>
    Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarTuong Lien <tuong.t.lien@dektech.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4cbf8ac2
node.h 5.11 KB