diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-06-18 01:25:54 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-06-18 01:25:54 +0000 |
commit | e9b20c9afa8bba88e98619240292213e870b55b2 (patch) | |
tree | c28d44bd41c5be9877cf5a6673901818ccc50818 /usr.sbin/ldpd/lde.h | |
parent | dec78b720b31d789236356d18e5ee4e38aaf8609 (diff) |
Fix small LIB<->LFIB synchronization issue.
ldpd operates only with the best routes of each IP prefix. In other words,
the routes with the lowest priorities.
When a route with a better priority is detected (possibly with a different
nexthop), we should uninstall the labels from the "old" routes and try
to install a new label for the new route (if there's one available in
the LIB).
In this specific case, ldpd was failing to uninstall the labels from the
old routes because it wasn't keeping track of each route's priority in
lde. With this missing bit of information, the parent process had no way
to get the correct label to uninstall when processing a IMSG_KLABEL_DELETE
message.
Diffstat (limited to 'usr.sbin/ldpd/lde.h')
-rw-r--r-- | usr.sbin/ldpd/lde.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/ldpd/lde.h b/usr.sbin/ldpd/lde.h index 5decb0f8459..b30c28965e1 100644 --- a/usr.sbin/ldpd/lde.h +++ b/usr.sbin/ldpd/lde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.h,v 1.39 2016/05/23 19:16:00 renato Exp $ */ +/* $OpenBSD: lde.h,v 1.40 2016/06/18 01:25:53 renato Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -102,6 +102,7 @@ struct fec_nh { int af; union ldpd_addr nexthop; uint32_t remote_label; + uint8_t priority; }; struct fec_node { @@ -159,10 +160,13 @@ void fec_clear(struct fec_tree *, void (*)(void *)); void rt_dump(pid_t); void fec_snap(struct lde_nbr *); void fec_tree_clear(void); -struct fec_nh *fec_nh_find(struct fec_node *, int, union ldpd_addr *); +struct fec_nh *fec_nh_find(struct fec_node *, int, union ldpd_addr *, + uint8_t); uint32_t egress_label(enum fec_type); -void lde_kernel_insert(struct fec *, int, union ldpd_addr *, int, void *); -void lde_kernel_remove(struct fec *, int, union ldpd_addr *); +void lde_kernel_insert(struct fec *, int, union ldpd_addr *, + uint8_t, int, void *); +void lde_kernel_remove(struct fec *, int, union ldpd_addr *, + uint8_t); void lde_check_mapping(struct map *, struct lde_nbr *); void lde_check_request(struct map *, struct lde_nbr *); void lde_check_release(struct map *, struct lde_nbr *); |