diff options
-rw-r--r-- | usr.sbin/bgpd/bgpd.8 | 8 | ||||
-rw-r--r-- | usr.sbin/bgpd/log.c | 9 | ||||
-rw-r--r-- | usr.sbin/bgpd/log.h | 9 |
3 files changed, 19 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/bgpd.8 b/usr.sbin/bgpd/bgpd.8 index b5d41f282c6..a2ce726af25 100644 --- a/usr.sbin/bgpd/bgpd.8 +++ b/usr.sbin/bgpd/bgpd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgpd.8,v 1.40 2011/09/17 16:29:44 claudio Exp $ +.\" $OpenBSD: bgpd.8,v 1.41 2012/06/10 11:16:08 claudio Exp $ .\" .\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 17 2011 $ +.Dd $Mdocdate: June 10 2012 $ .Dt BGPD 8 .Os .Sh NAME @@ -212,9 +212,9 @@ control socket .%D April 2009 .Re .Rs -.%R draft-ietf-idr-fsm-subcode-02 +.%R RFC 6608 .%T "Subcodes for BGP Finite State Machine Error" -.%D August 2011 +.%D May 2012 .Re .Rs .%R draft-ietf-grow-mrt-17 diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index 6405fd5791c..489aed36841 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.55 2011/08/20 19:02:28 sthen Exp $ */ +/* $OpenBSD: log.c,v 1.56 2012/06/10 11:16:08 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -291,9 +291,14 @@ log_notification(const struct peer *peer, u_int8_t errcode, u_int8_t subcode, suberrname = suberr_cease_names[subcode]; break; case ERR_HOLDTIMEREXPIRED: - case ERR_FSM: uk = 1; break; + case ERR_FSM: + if (subcode >= sizeof(suberr_fsm_names)/sizeof(char *)) + uk = 1; + else + suberrname = suberr_fsm_names[subcode]; + break; default: logit(LOG_CRIT, "%s: %s notification, unknown errcode " "%u, subcode %u", p, dir, errcode, subcode); diff --git a/usr.sbin/bgpd/log.h b/usr.sbin/bgpd/log.h index 6ca1bd66cbc..54444949ec4 100644 --- a/usr.sbin/bgpd/log.h +++ b/usr.sbin/bgpd/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.12 2012/05/22 20:42:48 claudio Exp $ */ +/* $OpenBSD: log.h,v 1.13 2012/06/10 11:16:08 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -71,6 +71,13 @@ static const char * const suberr_open_names[] = { "unsupported capability" }; +static const char * const suberr_fsm_names[] = { + "unspecified error", + "received unexpected message in OpenSent", + "received unexpected message in OpenConfirm", + "received unexpected message in Established" +}; + static const char * const suberr_update_names[] = { "none", "attribute list error", |