]> git.proxmox.com Git - mirror_frr.git/commit
zebra: label manager race condition fix
authorF. Aragon <paco@voltanet.io>
Fri, 5 Apr 2019 13:26:14 +0000 (15:26 +0200)
committerF. Aragon <paco@voltanet.io>
Tue, 9 Apr 2019 13:04:12 +0000 (15:04 +0200)
commit6920fd019038bb31bda11b6acd0c855f9547df71
treec4a07a321b68fb4466dd4e314e84739aca8a4342
parentfe09938b2b38e091bef84ca8798f55d5544105f6
zebra: label manager race condition fix

This fix covers the case where two or more events are processed but only one
becoming effective. E.g. when mixing a synchronous label request from a LDP
deamon and an asynchronous request from a BGP daemon it could happen to the
BGP having the label chunk, but the LDP stuck waiting for the response.

Given e.g.

  ldpd     <-------->
  (sync label request)
                       Zebra (label proxy)  <-->  Zebra (shared label manager)
  bgpd     <-------->
  (async label request)

Sequence:

   LDP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
   BGP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
                                                      <---- Zebra (LM) RP LDP
                                                      <---- Zebra (LM) RP BGP

Signed-off-by: F. Aragon <paco@voltanet.io>
zebra/label_manager.c