summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-06-04 23:31:22 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-06-04 23:31:22 +0000
commit3a3fb80f9fe2becda0ff8feaec9da5c2b0c4ccc5 (patch)
tree5e9832fa13754db95201aad188aa91cbf7e34d73 /usr.sbin/bgpd
parent9a59a5cb5a7045523ed108e0fa321d19af1599cb (diff)
when the max-prefix limit was exceeded generate a STOP event; we do not
want the session to be restarted automagically in that case.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/session.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 175da0539d3..1472b3d5a58 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.225 2005/06/04 23:14:32 henning Exp $ */
+/* $OpenBSD: session.c,v 1.226 2005/06/04 23:31:21 henning Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -2342,7 +2342,21 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt)
session_notification(p, errcode, subcode,
data, imsg.hdr.len - IMSG_HEADER_SIZE - 2);
- bgp_fsm(p, EVNT_CON_FATAL);
+ switch (errcode) {
+ case ERR_CEASE:
+ switch (subcode) {
+ case ERR_CEASE_MAX_PREFIX:
+ bgp_fsm(p, EVNT_STOP);
+ break;
+ default:
+ bgp_fsm(p, EVNT_CON_FATAL);
+ break;
+ }
+ break;
+ default:
+ bgp_fsm(p, EVNT_CON_FATAL);
+ break;
+ }
break;
default:
break;