summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl/parser.c
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2018-07-10 13:03:07 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2018-07-10 13:03:07 +0000
commitbff6d97a5d792d5919e274687ab7d30064d1517b (patch)
treef6f31156fdbf5d0a0d306fe9e30ea2078815da34 /usr.sbin/bgpctl/parser.c
parenteebdb39e841abef771207afc65d576874d614060 (diff)
Initialize the rtable in the requests send to bgpd to the current
rtables process. With this you dont need to add "table N" to commands when talking to a bgpd not in rdomain 0. ok claudio@ phessler@
Diffstat (limited to 'usr.sbin/bgpctl/parser.c')
-rw-r--r--usr.sbin/bgpctl/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c
index a8bf259b0ac..7435538e0cc 100644
--- a/usr.sbin/bgpctl/parser.c
+++ b/usr.sbin/bgpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.81 2017/10/15 20:44:21 deraadt Exp $ */
+/* $OpenBSD: parser.c,v 1.82 2018/07/10 13:03:06 benno Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -492,6 +492,7 @@ parse(int argc, char *argv[])
res.large_community.as = COMMUNITY_UNSET;
res.large_community.ld1 = COMMUNITY_UNSET;
res.large_community.ld2 = COMMUNITY_UNSET;
+ res.rtableid = getrtable();
TAILQ_INIT(&res.set);
if ((res.irr_outdir = getcwd(NULL, 0)) == NULL) {
fprintf(stderr, "getcwd failed: %s\n", strerror(errno));