summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_sr.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-02-13 22:47:41 +0100
committerMark Stapp <mjs@voltanet.io>2020-02-14 22:16:21 +0100
commit4945002d715ac449f6e59e6355234799dfde6d50 (patch)
tree85c4c968d960f6ca4c57b43bf4430bd49121f1f7 /ospfd/ospf_sr.c
parentMerge pull request #5794 from mjstapp/remove_nexthop_matched_flag (diff)
downloadfrr-4945002d715ac449f6e59e6355234799dfde6d50.tar.xz
frr-4945002d715ac449f6e59e6355234799dfde6d50.zip
*: encode zapi labels message using nexthops
Use the zapi_nexthop struct with the mpls_labels zapi messages instead of the special-purpose (and more limited) nexthop struct that was being used. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ospfd/ospf_sr.c')
-rw-r--r--ospfd/ospf_sr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index ff2039bec..b5a54a0bc 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -609,7 +609,7 @@ static int compute_prefix_nhlfe(struct sr_prefix *srp)
static int ospf_zebra_send_mpls_labels(int cmd, struct sr_nhlfe nhlfe)
{
struct zapi_labels zl = {};
- struct zapi_nexthop_label *znh;
+ struct zapi_nexthop *znh;
if (IS_DEBUG_OSPF_SR)
zlog_debug(" |- %s LSP %u/%u for %s/%u via %u",
@@ -631,10 +631,10 @@ static int ospf_zebra_send_mpls_labels(int cmd, struct sr_nhlfe nhlfe)
zl.nexthop_num = 1;
znh = &zl.nexthops[0];
znh->type = NEXTHOP_TYPE_IPV4_IFINDEX;
- znh->family = AF_INET;
- znh->address.ipv4 = nhlfe.nexthop;
+ znh->gate.ipv4 = nhlfe.nexthop;
znh->ifindex = nhlfe.ifindex;
- znh->label = nhlfe.label_out;
+ znh->label_num = 1;
+ znh->labels[0] = nhlfe.label_out;
return zebra_send_mpls_labels(zclient, cmd, &zl);
}