• Jon Paul Maloy's avatar
    tipc: stricter behavior of message reassembly function · 03b92017
    Jon Paul Maloy authored
    The function tipc_link_recv_fragment(struct sk_buff **buf) currently
    leaves the value of the input buffer pointer undefined when it returns,
    except when the return code indicates that the reassembly is complete.
    This despite the fact that it always consumes the input buffer.
    
    Here, we enforce a stricter behavior by this function, ensuring that
    the returned buffer pointer is non-NULL if and only if the reassembly
    is complete. This makes it possible to test for the buffer pointer as
    criteria for successful reassembly.
    
    We also rename the function to tipc_link_frag_rcv(), which is both
    shorter and more in line with common naming practice in the network
    subsystem.
    
    Apart from the new name, these changes have no impact on current
    users of the function, but makes it more practical for use in some
    planned future commits.
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    03b92017
bcast.c 22.9 KB