diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-02-19 22:19:54 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-02-19 22:19:54 +0000 |
commit | e3275efd6f1e2d1d90e0306d64c7d47ac9d19dcf (patch) | |
tree | 5b871f5b9a751005596fc01257d3187527dc74ac /usr.sbin | |
parent | d22b7717c4edc9279e92f2d2fffe6e79db362b6e (diff) |
Enable origination of Intra-Area-Prefix LSAs in rde.
New Intra-Area-Prefix LSAs are originated when a neighbour
becomes adjacent, or when a neighbour loses adjacency,
or when an interface changes state.
ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospf6d/rde.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c index e2c99c4d0a8..d2e9f735400 100644 --- a/usr.sbin/ospf6d/rde.c +++ b/usr.sbin/ospf6d/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.22 2009/02/19 22:17:07 stsp Exp $ */ +/* $OpenBSD: rde.c,v 1.23 2009/02/19 22:19:53 stsp Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -303,9 +303,13 @@ rde_dispatch_imsg(int fd, short event, void *bula) if (nbr == NULL) break; - if (state != nbr->state && (nbr->state & NBR_STA_FULL || - state & NBR_STA_FULL)) + if (state != nbr->state && + (nbr->state & NBR_STA_FULL || + state & NBR_STA_FULL)) { + nbr->state = state; area_track(nbr->area, state); + orig_intra_area_prefix_lsas(nbr->area); + } nbr->state = state; if (nbr->state & NBR_STA_FULL) @@ -577,7 +581,13 @@ rde_dispatch_imsg(int fd, short event, void *bula) iface->flags = ifp->flags; iface->linkstate = ifp->linkstate; iface->nh_reachable = ifp->nh_reachable; - iface->state = ifp->state; + if (iface->state != ifp->state) { + iface->state = ifp->state; + area = area_find(rdeconf, iface->area_id); + if (!area) + fatalx("interface lost area"); + orig_intra_area_prefix_lsas(area); + } break; default: log_debug("rde_dispatch_imsg: unexpected imsg %d", |