diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-10 13:00:50 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-10 13:00:50 +0000 |
commit | 88af1274777a730c135361dbf4e5f1556cd60fbd (patch) | |
tree | 7dc837b99c536386f379855ddd21bb01e7c7d170 | |
parent | bedb4609ffe1d8813ab1b57de8296473771f636a (diff) |
If ABR only look in the backbone area 0.0.0.0 for summary LSA. OK norby@
-rw-r--r-- | usr.sbin/ospfd/rde.c | 8 | ||||
-rw-r--r-- | usr.sbin/ospfd/rde.h | 4 | ||||
-rw-r--r-- | usr.sbin/ospfd/rde_spf.c | 10 |
3 files changed, 14 insertions, 8 deletions
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index 186b2f2f07c..9d88bd33d49 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.37 2006/01/12 15:10:02 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.38 2006/02/10 13:00:49 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -273,8 +273,12 @@ rde_dispatch_imsg(int fd, short event, void *bula) fatalx("rde_dispatch_imsg: " "neighbor does not exist"); - nbr->state = state; + if (state != nbr->state && (nbr->state & NBR_STA_FULL || + state & NBR_STA_FULL)) + area_track(nbr->area, state); + + nbr->state = state; if (nbr->state & NBR_STA_FULL) rde_req_list_free(nbr); break; diff --git a/usr.sbin/ospfd/rde.h b/usr.sbin/ospfd/rde.h index 2f11ecafb05..65f31116a12 100644 --- a/usr.sbin/ospfd/rde.h +++ b/usr.sbin/ospfd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.24 2006/02/02 15:10:57 norby Exp $ */ +/* $OpenBSD: rde.h,v 1.25 2006/02/10 13:00:49 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -119,7 +119,7 @@ void lsa_remove_invalid_sums(struct area *); /* rde_spf.c */ void spf_calc(struct area *); -void rt_calc(struct vertex *, struct area *); +void rt_calc(struct vertex *, struct area *, struct ospfd_conf *); void asext_calc(struct vertex *); void spf_tree_clr(struct area *); diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c index 72818bdca9a..4607e152a38 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.47 2006/02/09 20:47:20 norby Exp $ */ +/* $OpenBSD: rde_spf.c,v 1.48 2006/02/10 13:00:49 claudio Exp $ */ /* * Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -202,7 +202,7 @@ spf_calc(struct area *area) } void -rt_calc(struct vertex *v, struct area *area) +rt_calc(struct vertex *v, struct area *area, struct ospfd_conf *conf) { struct vertex *w; struct lsa_rtr_link *rtr_link = NULL; @@ -256,6 +256,8 @@ rt_calc(struct vertex *v, struct area *area) case LSA_TYPE_SUM_NETWORK: case LSA_TYPE_SUM_ROUTER: /* if ABR only look at area 0.0.0.0 LSA */ + if (area_border_router(conf) && area->id.s_addr != INADDR_ANY) + return; /* ignore self-originated stuff */ if (v->nbr->self) @@ -542,7 +544,7 @@ spf_timer(int fd, short event, void *arg) /* calculate route table */ RB_FOREACH(v, lsa_tree, &area->lsa_tree) { - rt_calc(v, area); + rt_calc(v, area, conf); } area->dirty = 0; @@ -550,7 +552,7 @@ spf_timer(int fd, short event, void *arg) } /* calculate as-external routes */ - RB_FOREACH(v, lsa_tree, &rdeconf->lsa_tree) { + RB_FOREACH(v, lsa_tree, &conf->lsa_tree) { asext_calc(v); } |