summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-06-30 21:52:37 +0200
committerMark Stapp <mjs@voltanet.io>2020-07-17 19:12:33 +0200
commit474aebd9391588d4cd5169187fd0e9abc812de42 (patch)
tree17921ba8bee88364720b2dfa72916543c950d976 /sharpd
parentzebra: include installed backup nexthops in kernel update (diff)
downloadfrr-474aebd9391588d4cd5169187fd0e9abc812de42.tar.xz
frr-474aebd9391588d4cd5169187fd0e9abc812de42.zip
lib,sharpd,zebra: initial support for multiple backup nexthops
Initial changes to support a nexthop with multiple backups. Lib changes to hold a small array in each primary, zapi message changes to support sending multiple backups, and daemon changes to show commands to support multiple backups. The config input for multiple backup indices is not present here. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_vty.c3
-rw-r--r--sharpd/sharp_zebra.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c
index 48220d1c9..1d2b87b9b 100644
--- a/sharpd/sharp_vty.c
+++ b/sharpd/sharp_vty.c
@@ -278,7 +278,8 @@ DEFPY (install_routes,
if (backup) {
/* Set flag and index in primary nexthop */
SET_FLAG(sg.r.nhop.flags, NEXTHOP_FLAG_HAS_BACKUP);
- sg.r.nhop.backup_idx = 0;
+ sg.r.nhop.backup_num = 1;
+ sg.r.nhop.backup_idx[0] = 0;
if (backup_nexthop4.s_addr != INADDR_ANY) {
sg.r.backup_nhop.gate.ipv4 = backup_nexthop4;
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index 7ab2d6ec2..74e44014a 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -155,6 +155,8 @@ int sharp_install_lsps_helper(bool install_p, const struct prefix *p,
return -1;
i++;
+ if (i >= MULTIPATH_NUM)
+ break;
}
}
@@ -188,6 +190,8 @@ int sharp_install_lsps_helper(bool install_p, const struct prefix *p,
return -1;
i++;
+ if (i >= MULTIPATH_NUM)
+ break;
}
if (i > 0)