summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.h
diff options
context:
space:
mode:
authorAcee Lindem <acee@lindem.com>2024-04-17 20:14:56 +0000
committerAcee Lindem <acee@lindem.com>2024-04-18 15:32:58 +0000
commit0ccad8a2b0b744d7ed64f53ab6e70a8d6aba69e6 (patch)
treefce17b663806106750689e00ba161c42dd53b6fd /ospfd/ospf_interface.h
parent84d1fb19e22a5f0d13d3bbb7c74e9948773e66f3 (diff)
ospfd: Add prefix-list filtering of OSPF neighbors on OSPF interface
This commit adds the capabiity to filter OSPF neighbors using a prefix-list with rules matching the neighbor's IP source address. Configuration, filtering, immediate neighbor pruning, topo-tests, and documentation are included. The command is: ip ospf neighbor-filter <prefix-list> [A.B.C.D] Signed-off-by: Acee Lindem <acee@lindem.com>
Diffstat (limited to 'ospfd/ospf_interface.h')
-rw-r--r--ospfd/ospf_interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h
index 721ab1a9d7..2e53fbfbfa 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -124,6 +124,9 @@ struct ospf_if_params {
/* Opaque LSA capability at interface level (see RFC5250) */
DECLARE_IF_PARAM(bool, opaque_capable);
+
+ /* Name of prefix-list name for packet source address filtering. */
+ DECLARE_IF_PARAM(char *, nbr_filter_name);
};
enum { MEMBER_ALLROUTERS = 0,
@@ -242,6 +245,9 @@ struct ospf_interface {
/* List of configured NBMA neighbor. */
struct list *nbr_nbma;
+ /* Configured prefix-list for filtering neighbors. */
+ struct prefix_list *nbr_filter;
+
/* Graceful-Restart data. */
struct {
struct {
@@ -367,6 +373,7 @@ extern void ospf_crypt_key_add(struct list *list, struct crypt_key *key);
extern int ospf_crypt_key_delete(struct list *list, uint8_t key_id);
extern uint8_t ospf_default_iftype(struct interface *ifp);
extern int ospf_interface_neighbor_count(struct ospf_interface *oi);
+extern void ospf_intf_neighbor_filter_apply(struct ospf_interface *oi);
/* Set all multicast memberships appropriately based on the type and
state of the interface. */