From bb8c0be811b76c6ab88d9ab6f84dfd86fefb3dbb Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 13 Nov 2012 09:47:21 +0000 Subject: Allow filtering based on the NEXTHOP attribute. This allows to build rules like: allow from any nexthop neighbor (to allow only prefixes that use the routers IP address as nexthop). Lots of testing, input and OK florian@ --- usr.sbin/bgpd/bgpd.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'usr.sbin/bgpd/bgpd.h') diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 370b62ab320..a412a641531 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.273 2012/09/18 10:10:00 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.274 2012/11/13 09:47:20 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -749,6 +749,13 @@ struct filter_prefix { u_int8_t len; }; +struct filter_nexthop { + struct bgpd_addr addr; + u_int8_t flags; +#define FILTER_NEXTHOP_ADDR 1 +#define FILTER_NEXTHOP_NEIGHBOR 2 +}; + struct filter_prefixlen { enum comp_ops op; u_int8_t aid; @@ -759,6 +766,7 @@ struct filter_prefixlen { struct filter_match { struct filter_prefix prefix; struct filter_prefixlen prefixlen; + struct filter_nexthop nexthop; struct filter_as as; struct filter_aslen aslen; struct filter_community community; -- cgit v1.2.3