summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-05-23 12:14:35 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-05-23 12:14:35 +0000
commit135258a79e78cbae288a7817884b5b7578180dc1 (patch)
treeeb1a0c82610248f1737fe89a4f56fa4bf8c47ab2
parent3430a613b0777f27be2c5d1b53731fd0410160b8 (diff)
support requesting route refresh from a neighbor
-rw-r--r--usr.sbin/bgpctl/bgpctl.88
-rw-r--r--usr.sbin/bgpctl/bgpctl.c7
-rw-r--r--usr.sbin/bgpctl/parser.c11
-rw-r--r--usr.sbin/bgpctl/parser.h3
4 files changed, 21 insertions, 8 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.8 b/usr.sbin/bgpctl/bgpctl.8
index 32e8792ae24..d0a8267ed50 100644
--- a/usr.sbin/bgpctl/bgpctl.8
+++ b/usr.sbin/bgpctl/bgpctl.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bgpctl.8,v 1.32 2006/04/06 12:25:54 claudio Exp $
+.\" $OpenBSD: bgpctl.8,v 1.33 2006/05/23 12:14:34 henning Exp $
.\"
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
.\"
@@ -71,6 +71,12 @@ may be the neighbor's address or description.
Stop and restart the BGP session to the specified neighbor.
.Ar peer
may be the neighbor's address or description.
+.It Cm neighbor Ar peer Cm rrefresh
+Request the neighbor to re-send all routes.
+Note that the neighbor is not obliged to re-send all routes, or any routes at
+all, even if it announced the route refresh capability.
+.Ar peer
+may be the neighbor's address or description.
.It Cm network add Ar prefix
Add the specified prefix to the list of announced networks.
.It Cm network delete Ar prefix
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 6d55e0be7ad..d9405b33100 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.103 2006/04/06 12:33:17 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.104 2006/05/23 12:14:34 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -248,6 +248,10 @@ main(int argc, char *argv[])
imsg_compose(ibuf, IMSG_CTL_NEIGHBOR_CLEAR, 0, 0, -1,
&neighbor, sizeof(neighbor));
break;
+ case NEIGHBOR_RREFRESH:
+ imsg_compose(ibuf, IMSG_CTL_NEIGHBOR_RREFRESH, 0, 0, -1,
+ &neighbor, sizeof(neighbor));
+ break;
case NETWORK_ADD:
case NETWORK_REMOVE:
bzero(&net, sizeof(net));
@@ -340,6 +344,7 @@ main(int argc, char *argv[])
case NEIGHBOR_UP:
case NEIGHBOR_DOWN:
case NEIGHBOR_CLEAR:
+ case NEIGHBOR_RREFRESH:
case NONE:
case RELOAD:
case FIB:
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c
index 61c93a3f69f..227a0fef217 100644
--- a/usr.sbin/bgpctl/parser.c
+++ b/usr.sbin/bgpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.29 2006/03/22 10:25:49 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.30 2006/05/23 12:14:34 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -163,10 +163,11 @@ static const struct token t_neighbor[] = {
};
static const struct token t_neighbor_modifiers[] = {
- { KEYWORD, "up", NEIGHBOR_UP, NULL},
- { KEYWORD, "down", NEIGHBOR_DOWN, NULL},
- { KEYWORD, "clear", NEIGHBOR_CLEAR, NULL},
- { ENDTOKEN, "", NONE, NULL}
+ { KEYWORD, "up", NEIGHBOR_UP, NULL},
+ { KEYWORD, "down", NEIGHBOR_DOWN, NULL},
+ { KEYWORD, "clear", NEIGHBOR_CLEAR, NULL},
+ { KEYWORD, "rrefresh", NEIGHBOR_RREFRESH, NULL},
+ { ENDTOKEN, "", NONE, NULL}
};
static const struct token t_show_as[] = {
diff --git a/usr.sbin/bgpctl/parser.h b/usr.sbin/bgpctl/parser.h
index cb0a3378deb..37a106346c9 100644
--- a/usr.sbin/bgpctl/parser.h
+++ b/usr.sbin/bgpctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.11 2006/01/24 15:28:03 henning Exp $ */
+/* $OpenBSD: parser.h,v 1.12 2006/05/23 12:14:34 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -40,6 +40,7 @@ enum actions {
NEIGHBOR_UP,
NEIGHBOR_DOWN,
NEIGHBOR_CLEAR,
+ NEIGHBOR_RREFRESH,
NETWORK_ADD,
NETWORK_REMOVE,
NETWORK_FLUSH,