diff options
author | 2009-07-28 19:20:40 +0000 | |
---|---|---|
committer | 2009-07-28 19:20:40 +0000 | |
commit | 4b0a4bc3a6d2cec03728c4cd5a6b3626f68392cc (patch) | |
tree | c811f869a8cc82ccaf981407d65df49fafed2f8b | |
parent | More fallout from the r1.31 commit. This time PID and the fd got swapped. (diff) | |
download | wireguard-openbsd-4b0a4bc3a6d2cec03728c4cd5a6b3626f68392cc.tar.xz wireguard-openbsd-4b0a4bc3a6d2cec03728c4cd5a6b3626f68392cc.zip |
Install interface addresses of other routers (LA bit set or 128 prefixlen)
as router type and not as a network.
From stsp@
-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) |