From 49a1b59f935674c35019c7f6bd8b8a5a83dd619c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 27 May 2009 17:43:51 -0700 Subject: Allow recursive route with any nexthop Bug 4228 Mark static routes as internal. By marking static routes as internal, they get re-evaluated as possible recursive routes. --- zebra/zebra_rib.c | 6 ++---- zebra/zebra_vty.c | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 5ea93112..ade13578 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -451,8 +451,7 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set, return 1; } } - else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL) - || match->type == ZEBRA_ROUTE_STATIC) + else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL)) { for (newhop = match->nexthop; newhop; newhop = newhop->next) if (CHECK_FLAG (newhop->flags, NEXTHOP_FLAG_FIB) @@ -589,8 +588,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, return 1; } } - else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL) || - match->type == ZEBRA_ROUTE_STATIC) + else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL)) { for (newhop = match->nexthop; newhop; newhop = newhop->next) if (CHECK_FLAG (newhop->flags, NEXTHOP_FLAG_FIB) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index ecb5d10a..d4e3a4ae 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -87,6 +87,9 @@ zebra_static_ipv4 (struct vty *vty, int add_cmd, const char *dest_str, return CMD_SUCCESS; } + /* Mark static routes as internal so they get evaluated as recursive */ + SET_FLAG (flag, ZEBRA_FLAG_INTERNAL); + /* Route flags */ if (flag_str) { switch(flag_str[0]) { -- cgit v1.2.3