diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-02-07 08:41:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-07 08:41:45 -0500 |
| commit | 22e9f17c7f93f0fbc0964eb923c165e4b484c9ed (patch) | |
| tree | ec5841376f43be3f5cd3ea1b2e352c8d9d0d7d9c /zebra/zebra_mpls.c | |
| parent | 06109208a597ddcbed2bb5646dddd98848431698 (diff) | |
| parent | 4312ff1c28be6de6c2a6a15e1829f256b7985d0b (diff) | |
Merge pull request #169 from opensourcerouting/ldpd-label-alloc-rework
ldpd: update local labels when necessary
Diffstat (limited to 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index decf3f5f8d..56a6ca7afa 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -1308,22 +1308,26 @@ mpls_ftn_update (int add, struct zebra_vrf *zvrf, enum lsp_types_t type, for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) { - if (nexthop->type != gtype) - continue; - switch (gtype) + switch (nexthop->type) { case NEXTHOP_TYPE_IPV4: case NEXTHOP_TYPE_IPV4_IFINDEX: + if (gtype != NEXTHOP_TYPE_IPV4 && gtype != NEXTHOP_TYPE_IPV4_IFINDEX) + continue; if (! IPV4_ADDR_SAME (&nexthop->gate.ipv4, &gate->ipv4)) continue; - if (gtype == NEXTHOP_TYPE_IPV4_IFINDEX && nexthop->ifindex != ifindex) + if (nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX && + nexthop->ifindex != ifindex) continue; goto found; case NEXTHOP_TYPE_IPV6: case NEXTHOP_TYPE_IPV6_IFINDEX: + if (gtype != NEXTHOP_TYPE_IPV6 && gtype != NEXTHOP_TYPE_IPV6_IFINDEX) + continue; if (! IPV6_ADDR_SAME (&nexthop->gate.ipv6, &gate->ipv6)) continue; - if (gtype == NEXTHOP_TYPE_IPV6_IFINDEX && nexthop->ifindex != ifindex) + if (nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX && + nexthop->ifindex != ifindex) continue; goto found; default: |
