summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index acad065a..8d4e732c 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1232,7 +1232,12 @@ rib_delnode (struct route_node *rn, struct rib *rib)
int
rib_add_ipv4 (int type, int flags, struct prefix_ipv4 *p,
struct in_addr *gate, unsigned int ifindex, u_int32_t vrf_id,
+#ifndef SUPPORT_REALMS
u_int32_t metric, u_char distance)
+#else
+ u_int32_t metric, u_char distance, u_int16_t realmto)
+#endif
+
{
struct rib *rib;
struct rib *same = NULL;
@@ -1315,6 +1320,10 @@ rib_add_ipv4 (int type, int flags, struct prefix_ipv4 *p,
/* Link new rib to node.*/
rib_addnode (rn, rib);
+#ifdef SUPPORT_REALMS
+ rib->realmto = realmto;
+#endif
+
/* Free implicit route.*/
if (same)
rib_delnode (rn, same);
@@ -1558,6 +1567,10 @@ static_install_ipv4 (struct prefix *p, struct static_ipv4 *si)
rib->distance = si->distance;
rib->metric = 0;
rib->nexthop_num = 0;
+#ifdef SUPPORT_REALMS
+ rib->realmto = si->realmto;
+#endif
+
switch (si->type)
{
@@ -1661,7 +1674,11 @@ static_uninstall_ipv4 (struct prefix *p, struct static_ipv4 *si)
/* Add static route into static route configuration. */
int
static_add_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
+#ifndef SUPPORT_REALMS
u_char flags, u_char distance, u_int32_t vrf_id)
+#else
+ u_char flags, u_char distance, u_int32_t vrf_id, u_int16_t realmto)
+#endif
{
u_char type = 0;
struct route_node *rn;
@@ -1716,6 +1733,10 @@ static_add_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
si->distance = distance;
si->flags = flags;
+#ifdef SUPPORT_REALMS
+ si->realmto = realmto;
+#endif
+
if (gate)
si->gate.ipv4 = *gate;
if (ifname)