summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2005-07-01 12:10:20 +0000
committerclaudio <claudio@openbsd.org>2005-07-01 12:10:20 +0000
commitdd846bb29f5831dbf2c945c79f790e864d3557a7 (patch)
tree298b9a7d75fac45bf29b7501a333db0ebefc8478
parentMake the pftable filter set use the name2id "cache" like the route labels. (diff)
downloadwireguard-openbsd-dd846bb29f5831dbf2c945c79f790e864d3557a7.tar.xz
wireguard-openbsd-dd846bb29f5831dbf2c945c79f790e864d3557a7.zip
The newly introduced function filterset_free() existed already as
rde_free_set(), I just missed it when I was looking for it. Kill rde_free_set() and use the more correct filterset_free() from now on.
-rw-r--r--usr.sbin/bgpd/rde.c6
-rw-r--r--usr.sbin/bgpd/rde.h3
-rw-r--r--usr.sbin/bgpd/rde_filter.c13
3 files changed, 5 insertions, 17 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index a8684266ae1..f5cd16bafab 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.164 2005/07/01 09:19:24 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.165 2005/07/01 12:10:20 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1889,7 +1889,7 @@ peer_remove(struct rde_peer *peer)
LIST_REMOVE(peer, hash_l);
LIST_REMOVE(peer, peer_l);
- rde_free_set(&peer->conf.attrset);
+ filterset_free(&peer->conf.attrset);
free(peer);
}
@@ -2091,7 +2091,7 @@ network_add(struct network_config *nc, int flagstatic)
DIR_DEFAULT_IN);
path_update(&peerdynamic, asp, &nc->prefix, nc->prefixlen);
}
- rde_free_set(&nc->attrset);
+ filterset_free(&nc->attrset);
}
void
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h
index 8072c87c8bf..25971418fac 100644
--- a/usr.sbin/bgpd/rde.h
+++ b/usr.sbin/bgpd/rde.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.h,v 1.67 2005/07/01 09:19:24 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.68 2005/07/01 12:10:21 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
@@ -347,7 +347,6 @@ void pt_dump(void (*)(struct pt_entry *, void *), void *,
/* rde_filter.c */
enum filter_actions rde_filter(struct rde_peer *, struct rde_aspath *,
struct bgpd_addr *, u_int8_t, enum directions);
-void rde_free_set(struct filter_set_head *);
void rde_apply_set(struct rde_aspath *, struct filter_set_head *,
sa_family_t, struct rde_peer *, enum directions);
int rde_filter_community(struct rde_aspath *, int, int);
diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c
index 98104dbc663..0c52caf13be 100644
--- a/usr.sbin/bgpd/rde_filter.c
+++ b/usr.sbin/bgpd/rde_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_filter.c,v 1.29 2005/07/01 09:19:24 claudio Exp $ */
+/* $OpenBSD: rde_filter.c,v 1.30 2005/07/01 12:10:21 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -59,17 +59,6 @@ rde_filter(struct rde_peer *peer, struct rde_aspath *asp,
}
void
-rde_free_set(struct filter_set_head *sh)
-{
- struct filter_set *set;
-
- while ((set = SIMPLEQ_FIRST(sh)) != NULL) {
- SIMPLEQ_REMOVE_HEAD(sh, entry);
- free(set);
- }
-}
-
-void
rde_apply_set(struct rde_aspath *asp, struct filter_set_head *sh,
sa_family_t af, struct rde_peer *peer, enum directions dir)
{