From 2c9033afd5ce5e99255d248fb065e94534405da7 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 3 Aug 2010 08:26:47 +0200 Subject: Do not allow interdependent recursive routes. --- nest/rt-table.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nest') diff --git a/nest/rt-table.c b/nest/rt-table.c index ef07042..389baaa 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -1509,7 +1509,16 @@ rt_update_hostentry(rtable *tab, struct hostentry *he) rta *a = n->routes->attrs; pxlen = n->n.pxlen; - if (a->dest == RTD_DEVICE) + if (a->hostentry) + { + /* Recursive route should not depend on another recursive route */ + log(L_WARN "Next hop address %I resolvable through recursive route for %I/%d", + he->addr, n->n.prefix, n->n.pxlen); + he->iface = NULL; + he->gw = IPA_NONE; + he->dest = RTD_UNREACHABLE; + } + else if (a->dest == RTD_DEVICE) { if (if_local_addr(he->addr, a->iface)) { -- cgit v1.2.3