From 3a3fb80f9fe2becda0ff8feaec9da5c2b0c4ccc5 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Sat, 4 Jun 2005 23:31:22 +0000 Subject: when the max-prefix limit was exceeded generate a STOP event; we do not want the session to be restarted automagically in that case. --- usr.sbin/bgpd/session.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd') 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 @@ -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; -- cgit v1.2.3