]> git.proxmox.com Git - mirror_frr.git/commit
zebra: fix zebra pseudowire manager NHT
authorKaren Schoener <karen@voltanet.io>
Mon, 27 Apr 2020 18:31:50 +0000 (14:31 -0400)
committerKaren Schoener <karen@volta.io>
Tue, 28 Apr 2020 18:39:12 +0000 (14:39 -0400)
commit13c46fa1a01c29f839d175f72093971cd82f5292
treefb0b74d047bb93cf7565ee9ccb76c96941a3a7f4
parentc516ebf90fa659f2026e28cf59bd026a5447762c
zebra: fix zebra pseudowire manager NHT

Intermittently, there is a 30 second delay for a LDP pseudowire to become
operational.

One way to reproduce the issue is: Once PW is up, shutdown link to trigger
a change to the pseudowire's next hop, and then restore link to cause
pseudowire to return to original NH.

Problem Descripton:
    The Zebra PW manager installs pseudowires in the data plane when the
    following two conditions are met:
        1. Pseudowire is labeled via LDP mapping messages
        2. A labeled NH route exists to reach the remote pseudowire endpoint

    The Zebra PW manager registers a NHT callback when a pseudowire is enabled.
    This allows the Zebra PW manager to install or reinstall the pseudowire.

    The Zebra PW manager deregisters for the NHT callback when the pseudowire is
    disabled.  When LDP learns the remote-pseudowire status is 'not forwarding',
    LDP notifies Zebra that the pseudowire is disabled.

    This creates a race condition where a new labeled NH can be resolved after the
    Zebra PW manager deregistered for the NHT callback.

    For static pseudowires, it makes sense for Zebra PW manager to deregister for
    NHT callbacks for disabled pseudowires.  Static pseudowires become disabled
    via CLI configuration commands.

    For LDP pseudowires, the Zebra PW manager should not deregister for NHT
    callbacks for disabled pseudowires.

Overview of changes:
    1. Zebra PW manager should not deregister for NHT callbacks when an LDP
       pseudowire is disabled.
       Zebra PW manager will register for NHT callbacks when the LDP pseudowire
       is first enabled.
       Zebra PW manager will deregister for NHT callbacks when the LDP
       pseudowire is deleted.
    2. Remove the 30 second timer that was added in PR4122.
       PR4122 tried to fix this race condition with a timer.
       Once we eliminate the race condition (by keeping the Zebra PW manager
       registered for NHT callbacks), this timer can be removed.
    3. Zebra PW manager handling of static pseudowires will remain as-is.
       Zebra PW manager will register for NHT callbacks when the static
       pseudowire is enabled.
       Zebra PW manager will deregister for NHT callbacks when the static
       pseudowire is disabled.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
zebra/zebra_pw.c