diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-08-20 15:49:03 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-08-20 15:49:03 +0000 |
commit | eff6c30ac0549a1f39584c4a8130f2ff471a5285 (patch) | |
tree | 27cacf85519d4ce0ff1febf31c976b29d96436ca | |
parent | 6af98f4d8a80b7ebd06bf43b138bab5ccaa97f11 (diff) |
add IMSG_CTL_NEIGHBOR_CLEAR, takes a session down and restarts it,
claudio ok
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 3 | ||||
-rw-r--r-- | usr.sbin/bgpd/control.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 86db0da8171..be066486916 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.140 2004/08/10 13:02:07 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.141 2004/08/20 15:49:02 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -287,6 +287,7 @@ enum imsg_type { IMSG_CTL_FIB_DECOUPLE, IMSG_CTL_NEIGHBOR_UP, IMSG_CTL_NEIGHBOR_DOWN, + IMSG_CTL_NEIGHBOR_CLEAR, IMSG_CTL_KROUTE, IMSG_CTL_KROUTE_ADDR, IMSG_CTL_SHOW_NEXTHOP, diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index 20eafc21c93..49d31ecf6b5 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.35 2004/08/20 15:47:38 henning Exp $ */ +/* $OpenBSD: control.c,v 1.36 2004/08/20 15:49:02 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -240,6 +240,7 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) break; case IMSG_CTL_NEIGHBOR_UP: case IMSG_CTL_NEIGHBOR_DOWN: + case IMSG_CTL_NEIGHBOR_CLEAR: if (imsg.hdr.len == IMSG_HEADER_SIZE + sizeof(struct bgpd_addr)) { addr = imsg.data; @@ -256,6 +257,10 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) case IMSG_CTL_NEIGHBOR_DOWN: bgp_fsm(p, EVNT_STOP); break; + case IMSG_CTL_NEIGHBOR_CLEAR: + bgp_fsm(p, EVNT_STOP); + bgp_fsm(p, EVNT_START); + break; default: fatal("king bula wants more humppa"); } |