diff options
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 3886e220b8..99db3a264e 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -570,6 +570,11 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set, return 0; /* Pick up selected route. */ + /* However, do not resolve over default route unless explicitly allowed. */ + if (is_default_prefix (&rn->p) && + !nh_resolve_via_default (p.family)) + return 0; + RNODE_FOREACH_RIB (rn, match) { if (CHECK_FLAG (match->status, RIB_ENTRY_REMOVED)) @@ -774,6 +779,11 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, return 0; /* Pick up selected route. */ + /* However, do not resolve over default route unless explicitly allowed. */ + if (is_default_prefix (&rn->p) && + !nh_resolve_via_default (p.family)) + return 0; + RNODE_FOREACH_RIB (rn, match) { if (CHECK_FLAG (match->status, RIB_ENTRY_REMOVED)) |
