Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple next-hop self config stanzas generate a list #1362

Merged
merged 1 commit into from
Feb 10, 2021

Commits on Jan 19, 2021

  1. Multiple next-hop self config stanzas generate a list

    For example, for the following policy:
    
    ```
    luca@bsr1.atl2> show configuration policy-options policy-statement INTERNAL-ATL2-RR-OUT
    term LOCAL-BE {
        from {
            protocol static;
            community PACKET-BE;
        }
        then {
            local-preference 500;
            next-hop self;
            accept;
        }
    }
    term LOCAL-PUBLIC {
        from {
            protocol static;
            prefix-list ANNOUNCE-ATL2-V4;
        }
        then {
            local-preference 500;
            next-hop self;
            accept;
        }
    }
    term LOCAL-CUSTOMERS {
        from {
            protocol bgp;
            community PACKET-ATL2-CUSTOMER;
            route-filter 0.0.0.0/0 upto /24;
        }
        then {
            next-hop self;
            accept;
        }
    }
    term GLOBAL-IP {
        from {
            protocol bgp;
            community PACKET-ATL2-GLOBAL-IP;
        }
        then {
            next-hop self;
            accept;
        }
    }
    term EVPN-REJECT-DEFAULT {
        from {
            protocol evpn;
            route-filter 0.0.0.0/0 exact;
        }
        then reject;
    }
    term EVPN-PACKET-INTERNAL {
        from {
            family evpn;
            community PACKET-INTERNAL-RT;
        }
        then accept;
    }
    then reject;
    ```
    
    `nhs_policies[p]` would be a list: `[True, True, True, True]`.
    
    Therefore, in case `nhs_policies[p]` is a list, then there's at least
    one next-hop self knob configured in the policy, so it can be marked as
    NHS-type policy.
    mirceaulinic committed Jan 19, 2021
    Configuration menu
    Copy the full SHA
    eff855f View commit details
    Browse the repository at this point in the history