diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-06 12:09:26 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-06 12:09:26 +0000 |
commit | 02c3a2e5d63f7973ef6b2e25fc7e4aca21ae4914 (patch) | |
tree | 28c0c2f9aaeae2a765aa42128ba3906595671b3e /usr.sbin/bgpd | |
parent | 6981d22ef17834ea5cb76e07bcba507aef4139a2 (diff) |
improve logging in teh capabilities parser
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/session.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index ab72afdfa3c..7dfa69d5071 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.164 2004/05/06 11:57:55 henning Exp $ */ +/* $OpenBSD: session.c,v 1.165 2004/05/06 12:09:25 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1037,7 +1037,6 @@ session_open(struct peer *p) errs += buf_add(buf, &op_type, sizeof(op_type)); errs += buf_add(buf, &op_len, sizeof(op_len)); - if (p->capa.ann_mp) { /* multiprotocol extensions, RFC 2858 */ capa_code = CAPA_MP; @@ -1729,8 +1728,12 @@ parse_notification(struct peer *peer) log_notification(peer, errcode, subcode, p, datalen); if (errcode == ERR_OPEN && subcode == ERR_OPEN_CAPA) { - if (datalen == 0) /* zebra likes to send those.. humbug */ + if (datalen == 0) { /* zebra likes to send those.. humbug */ + log_peer_warnx(&peer->conf, "received \"unsupported " + "capability\" notification without data part, " + "disabling capability announcements alltogether"); peer->capa.announce = 0; + } while (datalen > 0) { if (datalen < 2) { @@ -1765,6 +1768,11 @@ parse_notification(struct peer *peer) "disabling route refresh capability"); break; default: /* should not happen... */ + log_peer_warnx(&peer->conf, "received " + "\"unsupported capability\" notification " + "for unknown capability %u, disabling " + "capability announcements alltogether", + capa_code); peer->capa.announce = 0; break; } |