summaryrefslogtreecommitdiffstats
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorFeng Lu <lu.feng@6wind.com>2015-05-22 11:40:07 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2015-06-02 07:48:34 +0200
commitac19a449261bf69e83827f4bb0c6e5526277b41b (patch)
treea93cc7cde55a9c0c65da4b09fc309b503807ffda /zebra/rib.h
parent7aaf4ea990398335bd40b56cc9586ab6a7178a4f (diff)
downloadquagga-ac19a449261bf69e83827f4bb0c6e5526277b41b.tar.bz2
quagga-ac19a449261bf69e83827f4bb0c6e5526277b41b.tar.xz
zebra: maintain the router-id per VRF
A router may need different identifier among the VRFs. So move the maintenance of router-id per VRF. * rib.h: Move the previous global variables in router-id.c into the "struct zebra_vrf": - struct list _rid_all_sorted_list/*rid_all_sorted_list - struct list _rid_lo_sorted_list/*rid_lo_sorted_list - struct prefix rid_user_assigned * router-id.c/router-id.h: A new parameter "vrf_id" is added to all the router-id APIs. Their operations are done only within the specified VRF. A new command "router-id A.B.C.D vrf N" is added to allow manual router-id for any VRF. The old router_id_init() function is splitted into two: - router_id_cmd_init(): it only installs the commands - router_id_init(): this new one initializes the variables for a specified VRF * zebra_rib.c: Add new functions zebra_vrf_get/lookup() called from router-id.c. * main.c: Replace router_id_init() with router_id_cmd_init() and call the new router_id_init() in zebra_vrf_new(). Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index dcb307ef..06aa3535 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -23,6 +23,7 @@
#ifndef _ZEBRA_RIB_H
#define _ZEBRA_RIB_H
+#include "linklist.h"
#include "prefix.h"
#include "table.h"
#include "queue.h"
@@ -351,6 +352,15 @@ struct zebra_vrf
/* Static route configuration. */
struct route_table *stable[AFI_MAX][SAFI_MAX];
+
+ /* 2nd pointer type used primarily to quell a warning on
+ * ALL_LIST_ELEMENTS_RO
+ */
+ struct list _rid_all_sorted_list;
+ struct list _rid_lo_sorted_list;
+ struct list *rid_all_sorted_list;
+ struct list *rid_lo_sorted_list;
+ struct prefix rid_user_assigned;
};
/*