diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-02-25 12:02:41 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-02-25 12:02:41 +0000 |
commit | f1867084fc23f1d4f6f0b23ace008728b81d2658 (patch) | |
tree | 5bb8e891697f8e5187d4159705258a66017045ab /usr.sbin/bgpd/log.c | |
parent | 0c39811e573baff359a9acd1eb970824c82c1f3b (diff) |
we do have a table with suberror codes for cease and their meaning;
use it, instead of always telling "unknown suberror code X"
From: Leen Besselink <leen@consolejunkie.net>
if memory serves, cease didn't have suberror codes defined in the original
RFC 1771 and they were added later
Diffstat (limited to 'usr.sbin/bgpd/log.c')
-rw-r--r-- | usr.sbin/bgpd/log.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index e1236a5e9a5..39ff54fccc9 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.48 2006/01/05 17:33:40 claudio Exp $ */ +/* $OpenBSD: log.c,v 1.49 2007/02/25 12:02:40 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -277,9 +277,14 @@ log_notification(const struct peer *peer, u_int8_t errcode, u_int8_t subcode, else suberrname = suberr_update_names[subcode]; break; + case ERR_CEASE: + if (subcode >= sizeof(suberr_cease_names)/sizeof(char *)) + uk = 1; + else + suberrname = suberr_cease_names[subcode]; + break; case ERR_HOLDTIMEREXPIRED: case ERR_FSM: - case ERR_CEASE: uk = 1; break; default: |