Skip to content
  • Jon Paul Maloy's avatar
    tipc: make tipc_buf_append() more robust · 13e9b997
    Jon Paul Maloy authored
    
    
    As per comment from David Miller, we try to make the buffer reassembly
    function more resilient to user errors than it is today.
    
    - We check that the "*buf" parameter always is set, since this is
      mandatory input.
    
    - We ensure that *buf->next always is set to NULL before linking in
      the buffer, instead of relying of the caller to have done this.
    
    - We ensure that the "tail" pointer in the head buffer's control
      block is initialized to NULL when the first fragment arrives.
    
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    13e9b997