]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: Update ISIS-SR with new ZAPI message
authorOlivier Dugeon <olivier.dugeon@orange.com>
Tue, 3 Mar 2020 15:59:33 +0000 (16:59 +0100)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Thu, 30 Apr 2020 10:15:47 +0000 (12:15 +0200)
Update label enforcement due to modification in zapi message:
zapi_nexthop_label becomes zapi_nexthop as per PR #5813

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
isisd/isis_sr.c
isisd/isis_zebra.c

index 54689ea48dd230ff118dbde7a0f7b64f474636ed..9bdb2c40e87a49a11a882bdbfbe99fa8932e3023 100644 (file)
@@ -970,7 +970,7 @@ static void isis_sr_adj_sid_install_uninstall(bool install,
                                              const struct sr_adjacency *sra)
 {
        struct zapi_labels zl;
-       struct zapi_nexthop_label *znh;
+       struct zapi_nexthop *znh;
        int cmd;
 
        cmd = install ? ZEBRA_MPLS_LABELS_ADD : ZEBRA_MPLS_LABELS_DELETE;
@@ -980,13 +980,13 @@ static void isis_sr_adj_sid_install_uninstall(bool install,
        zl.local_label = sra->nexthop.label;
        zl.nexthop_num = 1;
        znh = &zl.nexthops[0];
-       znh->family = sra->nexthop.family;
-       znh->address = sra->nexthop.address;
+       znh->gate = sra->nexthop.address;
        znh->type = (sra->nexthop.family == AF_INET)
                            ? NEXTHOP_TYPE_IPV4_IFINDEX
                            : NEXTHOP_TYPE_IPV6_IFINDEX;
        znh->ifindex = sra->adj->circuit->interface->ifindex;
-       znh->label = MPLS_LABEL_IMPLICIT_NULL;
+       znh->label_num = 1;
+       znh->labels[0] = MPLS_LABEL_IMPLICIT_NULL;
 
        (void)zebra_send_mpls_labels(zclient, cmd, &zl);
 }
index 3ce75623143de4a52a7be88e855a57a824a95292..5a0f57d548ff03e655d9650f9df80422d03ed800 100644 (file)
@@ -257,7 +257,7 @@ void isis_zebra_route_del_route(struct prefix *prefix,
 void isis_zebra_install_prefix_sid(const struct sr_prefix *srp)
 {
        struct zapi_labels zl;
-       struct zapi_nexthop_label *znh;
+       struct zapi_nexthop *znh;
        struct listnode *node;
        struct isis_nexthop *nexthop;
        struct interface *ifp;
@@ -280,7 +280,8 @@ void isis_zebra_install_prefix_sid(const struct sr_prefix *srp)
                znh = &zl.nexthops[zl.nexthop_num++];
                znh->type = NEXTHOP_TYPE_IFINDEX;
                znh->ifindex = ifp->ifindex;
-               znh->label = MPLS_LABEL_IMPLICIT_NULL;
+               znh->label_num = 1;
+               znh->labels[0] = MPLS_LABEL_IMPLICIT_NULL;
                break;
        case ISIS_SR_PREFIX_REMOTE:
                /* Update route in the RIB too. */
@@ -301,10 +302,10 @@ void isis_zebra_install_prefix_sid(const struct sr_prefix *srp)
                        znh->type = (srp->prefix.family == AF_INET)
                                            ? NEXTHOP_TYPE_IPV4_IFINDEX
                                            : NEXTHOP_TYPE_IPV6_IFINDEX;
-                       znh->family = nexthop->family;
-                       znh->address = nexthop->ip;
+                       znh->gate = nexthop->ip;
                        znh->ifindex = nexthop->ifindex;
-                       znh->label = nexthop->sr.label;
+                       znh->label_num = 1;
+                       znh->labels[0] = nexthop->sr.label;
                }
                break;
        }