diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-16 17:53:22 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-16 17:53:22 +0200 |
commit | cd3b02d198093abbbe671f647e4deb2470eb9cf1 (patch) | |
tree | 87b5d936bba128b419fad7721b237f4596c44485 | |
parent | 8bd9b930c320f09d3b3792b5f991cf702e9d55be (diff) |
Allows IP of loopback to be used in automatic router ID selection.
Thanks to Alexander V. Chernikov for the patch.
-rw-r--r-- | nest/iface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nest/iface.c b/nest/iface.c index da79b21f..b4ab70c3 100644 --- a/nest/iface.c +++ b/nest/iface.c @@ -589,7 +589,7 @@ if_choose_router_id(struct iface_patt *mask, u32 old_id) WALK_LIST(i, iface_list) { if (!(i->flags & IF_ADMIN_UP) || - (i->flags & (IF_IGNORE | IF_SHUTDOWN))) + (i->flags & IF_SHUTDOWN)) continue; WALK_LIST(a, i->addrs) @@ -612,6 +612,10 @@ if_choose_router_id(struct iface_patt *mask, u32 old_id) if (mask && !iface_patt_match(mask, i, a)) continue; + /* FIXME: This should go away too */ + if ((i->flags & IF_IGNORE) && !mask) + continue; + /* No pattern or pattern matched */ if (!b || ipa_to_u32(a->ip) < ipa_to_u32(b->ip)) b = a; |