diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-06-04 22:54:23 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-06-04 22:54:23 +0000 |
commit | 0908f0e00179dceb202f6052d0ed45eb78cabb4b (patch) | |
tree | b6102ed34d13cd91b3440462655981808da56a9e /usr.sbin | |
parent | 85e7727562abd94611b841a1a7d0c6f32414511e (diff) |
use the recorded error code to prevent sending out multiple notifications
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 88016b21896..3c461341842 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.222 2005/06/04 22:50:20 henning Exp $ */ +/* $OpenBSD: session.c,v 1.223 2005/06/04 22:54:22 henning Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -1367,6 +1367,9 @@ session_notification(struct peer *peer, u_int8_t errcode, u_int8_t subcode, ssize_t len; int errs = 0; + if (peer->stats.last_sent_errcode) /* some notifctn already sent */ + return; + len = MSGSIZE_NOTIFICATION_MIN + datalen; memset(&msg.marker, 0xff, sizeof(msg.marker)); |