summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2012-07-13 14:05:55 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2012-07-13 14:05:58 +0200
commitf710888ddd413730f6025ed5d9a89b124836cde6 (patch)
treebe0dd0aaec834c52372b6914f4f87260acb2b219 /ospf6d/ospf6_interface.c
parent18a4e3715f89337ac8b70f6f63cc131c3218c82c (diff)
parent0402ca4e92fa0904d5ee0926482ebca08ffd5c81 (diff)
Merge remote branch 'vincentbernat/feature/ospfv3-mib'
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 71aa6859..40cda246 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -394,6 +394,7 @@ ospf6_interface_state_change (u_char next_state, struct ospf6_interface *oi)
ospf6_interface_state_str[prev_state],
ospf6_interface_state_str[next_state]);
}
+ oi->state_change++;
if ((prev_state == OSPF6_INTERFACE_DR ||
prev_state == OSPF6_INTERFACE_BDR) &&
@@ -420,6 +421,17 @@ ospf6_interface_state_change (u_char next_state, struct ospf6_interface *oi)
OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi);
OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area);
}
+
+#ifdef HAVE_SNMP
+ /* Terminal state or regression */
+ if ((next_state == OSPF6_INTERFACE_POINTTOPOINT) ||
+ (next_state == OSPF6_INTERFACE_DROTHER) ||
+ (next_state == OSPF6_INTERFACE_BDR) ||
+ (next_state == OSPF6_INTERFACE_DR) ||
+ (next_state < prev_state))
+ ospf6TrapIfStateChange (oi);
+#endif
+
}