diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-07-28 19:20:41 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-07-28 19:20:41 +0000 |
commit | 7afc8d5d244ef7fa7ce0ee24537168190fc65d09 (patch) | |
tree | 35e95dadb970a655a9dc871f016bf8130c2aa3f4 /usr.sbin/ospf6d/rde_spf.c | |
parent | 88a9cdeafb1de84f569930bea0de6d4827b69b60 (diff) |
Install interface addresses of other routers (LA bit set or 128 prefixlen)
as router type and not as a network.
From stsp@
Diffstat (limited to 'usr.sbin/ospf6d/rde_spf.c')
-rw-r--r-- | usr.sbin/ospf6d/rde_spf.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/rde_spf.c b/usr.sbin/ospf6d/rde_spf.c index bae92df9ac9..35164136c3d 100644 --- a/usr.sbin/ospf6d/rde_spf.c +++ b/usr.sbin/ospf6d/rde_spf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_spf.c,v 1.14 2009/04/09 19:06:52 stsp Exp $ */ +/* $OpenBSD: rde_spf.c,v 1.15 2009/07/28 19:20:40 claudio Exp $ */ /* * Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -212,6 +212,7 @@ rt_calc(struct vertex *v, struct area *area, struct ospfd_conf *conf) struct in6_addr ia6; u_int16_t i, off; u_int8_t flags; + enum path_type type; lsa_age(v); if (ntohs(v->lsa->hdr.age) == MAX_AGE) @@ -268,9 +269,15 @@ rt_calc(struct vertex *v, struct area *area, struct ospfd_conf *conf) adv_rtr.s_addr = htonl(w->adv_rtr); + if (prefix->prefixlen == 128 || + prefix->options & OSPF_PREFIX_LA) + type = DT_RTR; + else + type = DT_NET; + rt_update(&ia6, prefix->prefixlen, &w->nexthop, w->cost + ntohs(prefix->metric), 0, - area->id, adv_rtr, PT_INTRA_AREA, DT_NET, + area->id, adv_rtr, PT_INTRA_AREA, type, flags, 0); } off += sizeof(struct lsa_prefix) |