Skip to content
  • Jon Paul Maloy's avatar
    tipc: simplify message forwarding and rejection in socket layer · 1186adf7
    Jon Paul Maloy authored
    
    
    Despite recent improvements, the handling of error codes and return
    values at reception of messages in the socket layer is still confusing.
    
    In this commit, we try to make it more comprehensible. First, we
    separate between the return values coming from the functions called
    by tipc_sk_rcv(), -those are TIPC specific error codes, and the
    return values returned by tipc_sk_rcv() itself. Second, we don't
    use the returned TIPC error code as indication for whether a buffer
    should be forwarded/rejected or not; instead we use the buffer pointer
    passed along with filter_msg(). This separation is necessary because
    we sometimes want to forward messages even when there is no error
    (i.e., protocol messages and successfully secondary looked up data
    messages).
    
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1186adf7