diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2012-07-13 14:05:55 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-07-13 14:05:58 +0200 |
commit | f710888ddd413730f6025ed5d9a89b124836cde6 (patch) | |
tree | be0dd0aaec834c52372b6914f4f87260acb2b219 /ospf6d/ospf6_neighbor.c | |
parent | 18a4e3715f89337ac8b70f6f63cc131c3218c82c (diff) | |
parent | 0402ca4e92fa0904d5ee0926482ebca08ffd5c81 (diff) |
Merge remote branch 'vincentbernat/feature/ospfv3-mib'
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
-rw-r--r-- | ospf6d/ospf6_neighbor.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index f6c3aeac..806767dd 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -89,6 +89,7 @@ ospf6_neighbor_create (u_int32_t router_id, struct ospf6_interface *oi) buf, oi->interface->name); on->ospf6_if = oi; on->state = OSPF6_NEIGHBOR_DOWN; + on->state_change = 0; quagga_gettime (QUAGGA_CLK_MONOTONIC, &on->last_changed); on->router_id = router_id; @@ -154,6 +155,7 @@ ospf6_neighbor_state_change (u_char next_state, struct ospf6_neighbor *on) if (prev_state == next_state) return; + on->state_change++; quagga_gettime (QUAGGA_CLK_MONOTONIC, &on->last_changed); /* log */ @@ -180,6 +182,15 @@ ospf6_neighbor_state_change (u_char next_state, struct ospf6_neighbor *on) (next_state != OSPF6_NEIGHBOR_EXCHANGE && next_state != OSPF6_NEIGHBOR_LOADING)) ospf6_maxage_remove (on->ospf6_if->area->ospf6); + +#ifdef HAVE_SNMP + /* Terminal state or regression */ + if ((next_state == OSPF6_NEIGHBOR_FULL) || + (next_state == OSPF6_NEIGHBOR_TWOWAY) || + (next_state < prev_state)) + ospf6TrapNbrStateChange (on); +#endif + } /* RFC2328 section 10.4 */ |