summaryrefslogtreecommitdiffstats
path: root/ldpd/ldpe.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-01-27 17:22:47 +0100
committerRenato Westphal <renato@opensourcerouting.org>2017-02-02 01:03:36 +0100
commit45a8eba9721f8d9b9939a2c916c476eb8be3e78d (patch)
treeb9851dca94e1bba2341bdfc70d070af1e1ba7b4c /ldpd/ldpe.c
parentldpd: add synchronous IPC channels (diff)
downloadfrr-45a8eba9721f8d9b9939a2c916c476eb8be3e78d.tar.xz
frr-45a8eba9721f8d9b9939a2c916c476eb8be3e78d.zip
ldpd: introduce advanced filtering capabilities
This patch introduces several new configuration commands to ldpd. These commands should allow the operator to define advanced filtering policies for things like label advertisement, label allocation, etc. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldpe.c')
-rw-r--r--ldpd/ldpe.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c
index 236e71f32..0b441c181 100644
--- a/ldpd/ldpe.c
+++ b/ldpd/ldpe.c
@@ -408,8 +408,7 @@ ldpe_dispatch_main(struct thread *thread)
memcpy(&global.rtr_id, imsg.data,
sizeof(global.rtr_id));
if (leconf->rtr_id.s_addr == INADDR_ANY) {
- ldpe_reset_nbrs(AF_INET);
- ldpe_reset_nbrs(AF_INET6);
+ ldpe_reset_nbrs(AF_UNSPEC);
}
if_update_all(AF_UNSPEC);
tnbr_update_all(AF_UNSPEC);
@@ -722,13 +721,19 @@ ldpe_close_sockets(int af)
}
}
+int
+ldpe_acl_check(char *acl_name, int af, union ldpd_addr *addr, uint8_t prefixlen)
+{
+ return ldp_acl_request(iev_main_sync, acl_name, af, addr, prefixlen);
+}
+
void
ldpe_reset_nbrs(int af)
{
struct nbr *nbr;
RB_FOREACH(nbr, nbr_id_head, &nbrs_by_id) {
- if (nbr->af == af)
+ if (af == AF_UNSPEC || nbr->af == af)
session_shutdown(nbr, S_SHUTDOWN, 0, 0);
}
}