diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2005-03-26 18:49:35 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2005-03-26 18:49:35 +0000 |
commit | f4410d3dd5d1c0d59e26fab23aeaf2b281f4dd05 (patch) | |
tree | 915558c6dbc904166d6bedf53c4a7ea45bc4fb4f /usr.sbin/bgpd | |
parent | 768c9f73a9857b9f3ff46d48c680b6983f8b8800 (diff) |
proper check on log type. ok henning claudio
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index e411a25f7b0..0e3a67fb187 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.42 2004/11/18 14:30:10 henning Exp $ */ +/* $OpenBSD: log.c,v 1.43 2005/03/26 18:49:34 tedu Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -276,19 +276,19 @@ log_notification(const struct peer *peer, u_int8_t errcode, u_int8_t subcode, p = log_fmt_peer(&peer->conf); switch (errcode) { case ERR_HEADER: - if (subcode > sizeof(suberr_header_names)/sizeof(char *)) + if (subcode >= sizeof(suberr_header_names)/sizeof(char *)) uk = 1; else suberrname = suberr_header_names[subcode]; break; case ERR_OPEN: - if (subcode > sizeof(suberr_open_names)/sizeof(char *)) + if (subcode >= sizeof(suberr_open_names)/sizeof(char *)) uk = 1; else suberrname = suberr_open_names[subcode]; break; case ERR_UPDATE: - if (subcode > sizeof(suberr_update_names)/sizeof(char *)) + if (subcode >= sizeof(suberr_update_names)/sizeof(char *)) uk = 1; else suberrname = suberr_update_names[subcode]; |