This is part of the core VPN and Encap SAFI changes. Signed-off-by: Lou Berger <lber...@labn.net> Signed-off-by: David Lamparter <equi...@opensourcerouting.org> --- bgpd/bgp_nexthop.h | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/bgpd/bgp_nexthop.h b/bgpd/bgp_nexthop.h index 6e5350e..c8aef58 100644 --- a/bgpd/bgp_nexthop.h +++ b/bgpd/bgp_nexthop.h @@ -26,6 +26,15 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #define BGP_SCAN_INTERVAL_DEFAULT 60 #define BGP_IMPORT_INTERVAL_DEFAULT 15 +#define NEXTHOP_FAMILY(nexthop_len) ( \ + ((nexthop_len) == 4 || \ + (nexthop_len) == 12 ? AF_INET : \ + ((nexthop_len) == 16 || \ + (nexthop_len) == 24 || \ + (nexthop_len) == 48 ? AF_INET6 : \ + AF_UNSPEC)) \ +) + /* BGP nexthop cache value structure. */ struct bgp_nexthop_cache { -- 2.1.3 _______________________________________________ Quagga-dev mailing list Quagga-dev@lists.quagga.net https://lists.quagga.net/mailman/listinfo/quagga-dev