diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2012-04-04 19:20:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2012-04-04 19:20:45 +0000 |
commit | 2295d325f2f5745b55932460313ca783f148da44 (patch) | |
tree | f5c67a0a06477d8adda0d7cd90cb9e89b3abda9d /usr.sbin | |
parent | 7a286765e65095119b1fc6a4becd1c2f7ca506f4 (diff) |
Both LSA_TYPE_AREA_OPAQ and LSA_TYPE_AS_OPAQ can be found when traversing
the LSDB. So adjust SPF calculation to not trigger a fatal.
Problem found and fix tested by Chris Wopat
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospfd/rde_spf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c index aea7d4de426..7933c0cd92b 100644 --- a/usr.sbin/ospfd/rde_spf.c +++ b/usr.sbin/ospfd/rde_spf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_spf.c,v 1.73 2011/05/24 20:21:51 claudio Exp $ */ +/* $OpenBSD: rde_spf.c,v 1.74 2012/04/04 19:20:44 claudio Exp $ */ /* * Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -262,6 +262,9 @@ rt_calc(struct vertex *v, struct area *area, struct ospfd_conf *conf) } break; + case LSA_TYPE_AREA_OPAQ: + /* nothing to calculate */ + break; default: /* as-external LSA are stored in a different tree */ fatalx("rt_calc: invalid LSA type"); @@ -339,6 +342,9 @@ asext_calc(struct vertex *v) &v->nexthop, v->type, v->cost, cost2, a, adv_rtr, type, DT_NET, 0, ntohl(v->lsa->data.asext.ext_tag)); break; + case LSA_TYPE_AS_OPAQ: + /* nothing to calculate */ + break; default: fatalx("asext_calc: invalid LSA type"); } |