summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-08-20 14:42:56 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-08-28 07:51:06 -0400
commite7ff02539c22d6fde61844640bc1659e8588c09b (patch)
tree3e6d22c0c7518ec317b78742830ca213f7b89854 /lib/zclient.c
parent7cbdabffb6c11570e62e71a8b2818511c4756c60 (diff)
lib: Note old ifindex on shutdown
If we have an interface configured in a daemon on shutdown store the old ifindex value for retrieval on when it is possibly recreated. This is especially important for nexthop groups as that we had at one point in time the ability to restore the configuration but it was lost when we started deleting all deleted interfaces. We need the nexthop group subsystem to also mark that it has configured an interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 6b5f3e349a..b842e7c31b 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -2068,7 +2068,7 @@ static void zebra_interface_if_set_value(struct stream *s,
uint8_t link_params_status = 0;
ifindex_t old_ifindex, new_ifindex;
- old_ifindex = ifp->ifindex;
+ old_ifindex = ifp->oldifindex;
/* Read interface's index. */
STREAM_GETL(s, new_ifindex);
if_set_index(ifp, new_ifindex);