summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl/bgpctl.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-01-10 00:16:24 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-01-10 00:16:24 +0000
commitd1c662a8844fdccea09098f826cfdfe7d39faa9c (patch)
tree2cd4c29adecc1294b5bcb842b2ed12fe64cd2ad0 /usr.sbin/bgpctl/bgpctl.c
parentb2753e61513c65622a1dc634dafb402669ee2905 (diff)
ribreq uses now a AID, use AID also on the parsing side and convert to
AF when necessary. OK henning@
Diffstat (limited to 'usr.sbin/bgpctl/bgpctl.c')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index cbfda5deee2..77e4f2dbb5e 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.154 2009/12/16 15:42:19 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.155 2010/01/10 00:16:23 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -165,13 +165,15 @@ main(int argc, char *argv[])
case SHOW_FIB:
if (!res->addr.aid) {
struct buf *msg;
+ sa_family_t af;
+ af = aid2af(res->aid);
if ((msg = imsg_create(ibuf, IMSG_CTL_KROUTE, 0, 0,
- sizeof(res->flags) + sizeof(res->af))) == NULL)
+ sizeof(res->flags) + sizeof(af))) == NULL)
errx(1, "imsg_create failure");
if (imsg_add(msg, &res->flags, sizeof(res->flags)) ==
-1 ||
- imsg_add(msg, &res->af, sizeof(res->af)) == -1)
+ imsg_add(msg, &af, sizeof(af)) == -1)
errx(1, "imsg_add failure");
imsg_close(ibuf, msg);
} else
@@ -219,7 +221,7 @@ main(int argc, char *argv[])
memcpy(&ribreq.neighbor, &neighbor,
sizeof(ribreq.neighbor));
strlcpy(ribreq.rib, res->rib, sizeof(ribreq.rib));
- ribreq.af = res->af;
+ ribreq.aid = res->aid;
ribreq.flags = res->flags;
imsg_compose(ibuf, type, 0, 0, -1, &ribreq, sizeof(ribreq));
if (!(res->flags & F_CTL_DETAIL))
@@ -289,7 +291,7 @@ main(int argc, char *argv[])
break;
case NETWORK_SHOW:
bzero(&ribreq, sizeof(ribreq));
- ribreq.af = res->af;
+ ribreq.aid = res->aid;
strlcpy(ribreq.rib, res->rib, sizeof(ribreq.rib));
imsg_compose(ibuf, IMSG_CTL_SHOW_NETWORK, 0, 0, -1,
&ribreq, sizeof(ribreq));