summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-11-23 13:07:02 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-11-23 13:07:02 +0000
commit3ecbd19bc3b00d71c40c04d62543e55cbef5df7e (patch)
treec4553ea4ef5dde0286f17884869a17d09fbf697a /usr.sbin/bgpd/rde_rib.c
parent9daf609d794b2746f640fc119c62a2d55b43344f (diff)
Switch from a single filter_set to a linked list of sets. With this change
it is possible to specify multiple communities. This is also the first step to better bgpd filters. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde_rib.c')
-rw-r--r--usr.sbin/bgpd/rde_rib.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index f39e7b3eafc..5e9dbc4830f 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.62 2004/11/19 09:59:27 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.63 2004/11/23 13:07:01 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -749,17 +749,20 @@ nexthop_update(struct kroute_nexthop *msg)
}
void
-nexthop_modify(struct rde_aspath *asp, struct bgpd_addr *nexthop, int flags,
- sa_family_t af)
+nexthop_modify(struct rde_aspath *asp, struct bgpd_addr *nexthop,
+ enum action_types type, sa_family_t af)
{
struct nexthop *nh;
- if (flags & SET_NEXTHOP_REJECT)
+ if (type == ACTION_SET_NEXTHOP_REJECT) {
asp->flags |= F_NEXTHOP_REJECT;
- if (flags & SET_NEXTHOP_BLACKHOLE)
+ return;
+ }
+ if (type == ACTION_SET_NEXTHOP_BLACKHOLE) {
asp->flags |= F_NEXTHOP_BLACKHOLE;
- if (!(flags & SET_NEXTHOP) ||
- af != nexthop->af)
+ return;
+ }
+ if (af != nexthop->af)
return;
nh = nexthop_get(nexthop);