bgpd: add nexthop length to AF macro

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3e841d3b49bdb475ce793eee5d82e5137dff57d3)
This commit is contained in:
Lou Berger 2016-01-12 13:41:51 -05:00 committed by Daniel Walton
parent 1ec23d90a3
commit 95b9c671be

View File

@ -25,6 +25,15 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "queue.h"
#include "prefix.h"
#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
{