diff options
Diffstat (limited to 'usr.sbin/ospf6d/neighbor.c')
-rw-r--r-- | usr.sbin/ospf6d/neighbor.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/ospf6d/neighbor.c b/usr.sbin/ospf6d/neighbor.c index 8352803c0ef..9e5f77199aa 100644 --- a/usr.sbin/ospf6d/neighbor.c +++ b/usr.sbin/ospf6d/neighbor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: neighbor.c,v 1.4 2007/11/27 11:29:34 claudio Exp $ */ +/* $OpenBSD: neighbor.c,v 1.5 2007/12/13 08:54:05 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -200,12 +200,14 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event) nbr->peerid, 0, &new_state, sizeof(new_state)); if (old_state & NBR_STA_FULL || nbr->state & NBR_STA_FULL) { + extern struct ospfd_conf *oeconf; /* XXX */ /* * neighbor changed from/to FULL * originate new rtr and net LSA */ - area_track(nbr->iface->area, nbr->state); - orig_rtr_lsa(nbr->iface->area); + area_track(area_find(oeconf, nbr->iface->area_id), + nbr->state); + orig_rtr_lsa(nbr->iface); if (nbr->iface->state & IF_STA_DR) orig_net_lsa(nbr->iface); @@ -225,7 +227,7 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event) nbr_state_name(nbr->state)); if (nbr->iface->type == IF_TYPE_VIRTUALLINK) { - orig_rtr_lsa(nbr->iface->area); + orig_rtr_lsa(nbr->iface); } } @@ -313,7 +315,7 @@ nbr_new(u_int32_t nbr_id, struct iface *iface, int self) bzero(&rn, sizeof(rn)); rn.id.s_addr = nbr->id.s_addr; - rn.area_id.s_addr = nbr->iface->area->id.s_addr; + rn.area_id.s_addr = nbr->iface->area_id.s_addr; rn.ifindex = nbr->iface->ifindex; rn.state = nbr->state; rn.self = self; @@ -644,7 +646,7 @@ nbr_to_ctl(struct nbr *nbr) memcpy(&nctl.addr, &nbr->addr, sizeof(nctl.addr)); memcpy(&nctl.dr, &nbr->dr, sizeof(nctl.dr)); memcpy(&nctl.bdr, &nbr->bdr, sizeof(nctl.bdr)); - memcpy(&nctl.area, &nbr->iface->area->id, sizeof(nctl.area)); + memcpy(&nctl.area, &nbr->iface->area_id, sizeof(nctl.area)); /* this list is 99% of the time empty so that's OK for now */ nctl.db_sum_lst_cnt = 0; |