summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_neighbor.c
diff options
context:
space:
mode:
authorVincent Bernat <bernat@luffy.cx>2012-06-04 14:36:12 +0200
committerVincent Bernat <bernat@luffy.cx>2012-06-25 19:05:17 +0200
commitbf836661ef8ef880350bc41f0a82566ed5075066 (patch)
tree09fe0cfd070a3984860b1ffc89020caba892eff4 /ospf6d/ospf6_neighbor.c
parentc349bb86927d1f5fc8aa8ebc6f553786f8e70634 (diff)
ospf6d: add SNMP notifications/traps support
Only implement ospfv3NbrStateChange and ospfv3IfStateChange.
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
-rw-r--r--ospf6d/ospf6_neighbor.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index ab157ca8..806767dd 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -182,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 */