diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-06-13 21:16:19 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-06-13 21:16:19 +0000 |
commit | b67d52447b7269e8a850cde9cd3d1d55bdbf43b0 (patch) | |
tree | 5a9cf9ea456458e9d7945642b0aa24309f91d123 /usr.sbin/bgpd/rde.c | |
parent | f5b0690d48b94e07abc90ee4f1e44565f941df53 (diff) |
route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index a484185e4bc..a2e485e0403 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.161 2005/06/10 08:28:50 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.162 2005/06/13 21:16:18 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1611,10 +1611,10 @@ rde_dump_prefix(struct ctl_show_rib_prefix *pref, pid_t pid) void rde_send_kroute(struct prefix *new, struct prefix *old) { - struct kroute kr; - struct bgpd_addr addr; - struct prefix *p; - enum imsg_type type; + struct kroute_label kl; + struct bgpd_addr addr; + struct prefix *p; + enum imsg_type type; /* * If old is != NULL we know it was active and should be removed. @@ -1627,7 +1627,7 @@ rde_send_kroute(struct prefix *new, struct prefix *old) new->aspath->flags & F_PREFIX_ANNOUNCED)) return; - bzero(&kr, sizeof(kr)); + bzero(&kl, sizeof(kl)); if (new == NULL || new->aspath->nexthop == NULL || new->aspath->nexthop->state != NEXTHOP_REACH || @@ -1637,18 +1637,21 @@ rde_send_kroute(struct prefix *new, struct prefix *old) } else { type = IMSG_KROUTE_CHANGE; p = new; - kr.nexthop.s_addr = p->aspath->nexthop->true_nexthop.v4.s_addr; + kl.kr.nexthop.s_addr = + p->aspath->nexthop->true_nexthop.v4.s_addr; } pt_getaddr(p->prefix, &addr); - kr.prefix.s_addr = addr.v4.s_addr; - kr.prefixlen = p->prefix->prefixlen; + kl.kr.prefix.s_addr = addr.v4.s_addr; + kl.kr.prefixlen = p->prefix->prefixlen; if (p->aspath->flags & F_NEXTHOP_REJECT) - kr.flags |= F_REJECT; + kl.kr.flags |= F_REJECT; if (p->aspath->flags & F_NEXTHOP_BLACKHOLE) - kr.flags |= F_BLACKHOLE; + kl.kr.flags |= F_BLACKHOLE; + /* XXX */ + strlcpy(kl.label, rtlabel_id2name(0), sizeof(kl.label)); - if (imsg_compose(ibuf_main, type, 0, 0, -1, &kr, sizeof(kr)) == -1) + if (imsg_compose(ibuf_main, type, 0, 0, -1, &kl, sizeof(kl)) == -1) fatal("imsg_compose error"); } |