]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_mpls.c
lib: Isolate nexthop_group functions to nexthop_group.c
[mirror_frr.git] / zebra / zebra_mpls.c
index 2dc98127f565e78ed15ed3aecc1af49cd003c6a4..0af06806d3481bc2c6572000c1401a7eff227cd9 100644 (file)
@@ -182,7 +182,7 @@ static int lsp_install(struct zebra_vrf *zvrf, mpls_label_t label,
         * the label advertised by the recursive nexthop (plus we don't have the
         * logic yet to push multiple labels).
         */
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next) {
                /* Skip inactive and recursive entries. */
                if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
                        continue;
@@ -637,7 +637,7 @@ static int nhlfe_nexthop_active_ipv4(zebra_nhlfe_t *nhlfe,
                    || !CHECK_FLAG(match->flags, ZEBRA_FLAG_SELECTED))
                        continue;
 
-               for (match_nh = match->nexthop; match_nh;
+               for (match_nh = match->ng.nexthop; match_nh;
                     match_nh = match_nh->next) {
                        if (match->type == ZEBRA_ROUTE_CONNECT
                            || nexthop->ifindex == match_nh->ifindex) {
@@ -688,10 +688,10 @@ static int nhlfe_nexthop_active_ipv6(zebra_nhlfe_t *nhlfe,
                        break;
        }
 
-       if (!match || !match->nexthop)
+       if (!match || !match->ng.nexthop)
                return 0;
 
-       nexthop->ifindex = match->nexthop->ifindex;
+       nexthop->ifindex = match->ng.nexthop->ifindex;
        return 1;
 }
 
@@ -2286,7 +2286,7 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
        if (re == NULL)
                return -1;
 
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next) {
                switch (nexthop->type) {
                case NEXTHOP_TYPE_IPV4:
                case NEXTHOP_TYPE_IPV4_IFINDEX:
@@ -2504,7 +2504,7 @@ void mpls_ldp_ftn_uninstall_all(struct zebra_vrf *zvrf, int afi)
        for (rn = route_top(table); rn; rn = route_next(rn)) {
                update = 0;
                RNODE_FOREACH_RE (rn, re) {
-                       for (nexthop = re->nexthop; nexthop;
+                       for (nexthop = re->ng.nexthop; nexthop;
                             nexthop = nexthop->next) {
                                if (nexthop->nh_label_type != ZEBRA_LSP_LDP)
                                        continue;