diff options
author | 2009-12-03 19:22:53 +0000 | |
---|---|---|
committer | 2009-12-03 19:22:53 +0000 | |
commit | ad45d28fe3a74ebe56446545b8363e85d7b7666b (patch) | |
tree | 1481417c9a076168921f575c3ea4881d74715d4b | |
parent | Only log if there is a chance that the session may come up if the neighbor (diff) | |
download | wireguard-openbsd-ad45d28fe3a74ebe56446545b8363e85d7b7666b.tar.xz wireguard-openbsd-ad45d28fe3a74ebe56446545b8363e85d7b7666b.zip |
A bgpctl nei XY clear should not restart neighbors that are administrativly
down. So after a bgpctl reload clearing a neighbor will bring that neighbor
into the configured state (in this case down). OK henning@
-rw-r--r-- | usr.sbin/bgpd/control.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index 3ae589677bb..f6760cb7698 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.65 2009/12/02 19:10:02 mk Exp $ */ +/* $OpenBSD: control.c,v 1.66 2009/12/03 19:22:53 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -333,9 +333,15 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) control_result(c, CTL_RES_OK); break; case IMSG_CTL_NEIGHBOR_CLEAR: - session_stop(p, ERR_CEASE_ADMIN_RESET); - timer_set(p, Timer_IdleHold, - SESSION_CLEAR_DELAY); + if (!p->conf.down) { + session_stop(p, + ERR_CEASE_ADMIN_RESET); + timer_set(p, Timer_IdleHold, + SESSION_CLEAR_DELAY); + } else { + session_stop(p, + ERR_CEASE_ADMIN_DOWN); + } control_result(c, CTL_RES_OK); break; case IMSG_CTL_NEIGHBOR_RREFRESH: |