• Allan Stephens's avatar
    tipc: Fix premature broadcast advertisement by sending node · 5b1f7bde
    Allan Stephens authored
    Prevent a TIPC node from sending out a LINK_STATE message
    advertising a broadcast message that it is in the process
    of sending, but has not yet actually sent.  Previously, it was
    possible for a link timeout to occur in between the time the
    broadcast link updated its "last message sent" counter and the
    time the broadcast message was passed to the broadcast bearer
    for transmission.  This ensures that the code which issues
    the LINK_STATE message isn't informed of the new message until
    the broadcast bearer has had a chance to send it.
    
    Note: The "last message sent" value is stored in the "fsm_msg_count"
    field of the link structure used by the broadcast link.  Since the
    broadcast link doesn't utilize the normal link FSM, this field can
    be re-used rather than adding a new field to the broadcast link.
    Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
    Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5b1f7bde
bcast.c 23 KB