diff options
author | Alexander V. Chernikov <melifaro@ipfw.ru> | 2022-12-09 15:59:06 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2022-12-09 16:01:30 +0100 |
commit | a80cd4707464cedb526eb72e7704b097af20beb7 (patch) | |
tree | 7f29a583093e7822a8c2a2717fcea46621aadebf /sysdep/linux | |
parent | 3859e4efc1597368df647323c5a3cc1771cb64ca (diff) |
Netlink on FreeBSD support
Netlink support was added to FreeBSD recently. It is not as full-featured
as its Linux counterpart yet, however the added subset is enough to make
a routing daemon work. Specifically, it supports multiple tables,
multipath, nexthops and nexthops groups. No MPLS support yet.
The attached change adds 'bsd-netlink’ sysconf target, allowing to build
both netlink & rtsock versions on FreeBSD.
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/netlink.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index d9e81c10..dcb25911 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -6,7 +6,6 @@ * Can be freely distributed and used under the terms of the GNU GPL. */ -#include <alloca.h> #include <stdio.h> #include <unistd.h> #include <fcntl.h> @@ -28,10 +27,16 @@ #include "lib/hash.h" #include "conf/conf.h" +#ifdef CONFIG_LINUX_NETLINK #include <asm/types.h> #include <linux/if.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> +#endif +#ifdef CONFIG_FREEBSD_NETLINK +#include <netlink/netlink.h> +#include <netlink/netlink_route.h> +#endif #ifdef HAVE_MPLS_KERNEL #include <linux/lwtunnel.h> |