From 41139815903eb7adfca707f5fdb591404e9ed71e Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 15 Oct 2010 07:45:33 +0000 Subject: Add the FSM suberrors specified in draft-ietf-idr-fsm-subcode. This should help identifying FSM errors since the state is know known. OK henning@ sthen@ --- usr.sbin/bgpd/session.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.sbin/bgpd/session.c') diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 55b232fc8f3..7274c7de2e8 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.311 2010/09/02 14:03:21 sobrado Exp $ */ +/* $OpenBSD: session.c,v 1.312 2010/10/15 07:45:32 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -753,7 +753,8 @@ bgp_fsm(struct peer *peer, enum session_events event) change_state(peer, STATE_IDLE, event); break; default: - session_notification(peer, ERR_FSM, 0, NULL, 0); + session_notification(peer, + ERR_FSM, ERR_FSM_UNEX_OPENSENT, NULL, 0); change_state(peer, STATE_IDLE, event); break; } @@ -787,7 +788,8 @@ bgp_fsm(struct peer *peer, enum session_events event) change_state(peer, STATE_IDLE, event); break; default: - session_notification(peer, ERR_FSM, 0, NULL, 0); + session_notification(peer, + ERR_FSM, ERR_FSM_UNEX_OPENCONFIRM, NULL, 0); change_state(peer, STATE_IDLE, event); break; } @@ -827,7 +829,8 @@ bgp_fsm(struct peer *peer, enum session_events event) change_state(peer, STATE_IDLE, event); break; default: - session_notification(peer, ERR_FSM, 0, NULL, 0); + session_notification(peer, + ERR_FSM, ERR_FSM_UNEX_ESTABLISHED, NULL, 0); change_state(peer, STATE_IDLE, event); break; } -- cgit v1.2.3