diff options
author | Amol Lad <amol.lad@4rf.com> | 2021-02-17 01:47:32 +0100 |
---|---|---|
committer | Reuben Dowle <reuben.dowle@4rf.com> | 2021-04-05 23:22:59 +0200 |
commit | fa31fcf2ea1157d3d14968d704878cc8fe058c91 (patch) | |
tree | 22e31544342b63579aab8865d229562152b96173 /nhrpd/nhrpd.h | |
parent | Merge pull request #8348 from chiragshah6/mdev (diff) | |
download | frr-fa31fcf2ea1157d3d14968d704878cc8fe058c91.tar.xz frr-fa31fcf2ea1157d3d14968d704878cc8fe058c91.zip |
nhrpd: Add support for forwarding multicast packets
Forwarding multicast is a pre-requisite for allowing multicast based routing
protocols such as OSPF to work with DMVPN
This code relies on externally adding iptables rule. For example:
iptables -A OUTPUT -d 224.0.0.0/24 -o gre1 -j NFLOG --nflog-group 224
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd/nhrpd.h')
-rw-r--r-- | nhrpd/nhrpd.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h index e4afb22f8..1d0d99915 100644 --- a/nhrpd/nhrpd.h +++ b/nhrpd/nhrpd.h @@ -24,6 +24,7 @@ DECLARE_MGROUP(NHRPD); #define NHRP_VTY_PORT 2610 #define NHRP_DEFAULT_CONFIG "nhrpd.conf" +#define MCAST_NFLOG_GROUP 224 extern struct thread_master *master; @@ -264,6 +265,13 @@ struct nhrp_nhs { struct list_head reglist_head; }; +struct nhrp_multicast { + struct interface *ifp; + struct list_head list_entry; + afi_t afi; + union sockunion nbma_addr; /* IP-address */ +}; + struct nhrp_registration { struct list_head reglist_entry; struct thread *t_register; @@ -309,6 +317,7 @@ struct nhrp_interface { unsigned short mtu; unsigned int holdtime; struct list_head nhslist_head; + struct list_head mcastlist_head; } afi[AFI_MAX]; }; @@ -350,6 +359,13 @@ void nhrp_nhs_foreach(struct interface *ifp, afi_t afi, void *ctx); void nhrp_nhs_interface_del(struct interface *ifp); +int nhrp_multicast_add(struct interface *ifp, afi_t afi, union sockunion *nbma_addr); +int nhrp_multicast_del(struct interface *ifp, afi_t afi, union sockunion *nbma_addr); +void nhrp_multicast_interface_del(struct interface *ifp); +void nhrp_multicast_foreach(struct interface *ifp, afi_t afi, + void (*cb)(struct nhrp_multicast *, void *), + void *ctx); + void nhrp_route_update_nhrp(const struct prefix *p, struct interface *ifp); void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix *p, struct interface *ifp, |