diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-08-03 08:26:47 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-08-03 08:26:47 +0200 |
commit | 2c9033afd5ce5e99255d248fb065e94534405da7 (patch) | |
tree | 85f2e8b83bdeff3d19cbc81acf8b033eaec8c90a /nest | |
parent | f428631cd6f48c5155bd1b7724e9bb8a545fda12 (diff) |
Do not allow interdependent recursive routes.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/rt-table.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index ef070428..389baaa2 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)) { |