1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Merge commit 'a80cd4707464cedb526eb72e7704b097af20beb7' into thread-next

This commit is contained in:
Maria Matejka
2023-01-21 23:46:33 +01:00
3 changed files with 42 additions and 1 deletions

34
sysdep/cf/bsd-netlink.h Normal file
View File

@@ -0,0 +1,34 @@
/*
* Configuration for FreeBSD based systems with netlink support
*
* (c) 2022 Alexander Chernikov <melifaro@FreeBSD.org>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#define CONFIG_AUTO_ROUTES
#define CONFIG_SELF_CONSCIOUS
#define CONFIG_MULTIPLE_TABLES
#define CONFIG_SINGLE_ROUTE
#define CONFIG_SKIP_MC_BIND
#define CONFIG_NO_IFACE_BIND
#define CONFIG_USE_HDRINCL
#define CONFIG_INCLUDE_SYSIO_H "sysdep/bsd/sysio.h"
#define CONFIG_INCLUDE_KRTSYS_H "sysdep/linux/krt-sys.h"
#define CONFIG_FREEBSD_NETLINK
#ifndef AF_MPLS
#define AF_MPLS 39
#endif
#ifndef SO_RCVBUFFORCE
#define SO_RCVBUFFORCE SO_RCVBUF
#endif
/*
Link: sysdep/unix
Link: sysdep/bsd-netlink
*/

View File

@@ -17,6 +17,8 @@
#define CONFIG_INCLUDE_SYSIO_H "sysdep/linux/sysio.h"
#define CONFIG_INCLUDE_KRTSYS_H "sysdep/linux/krt-sys.h"
#define CONFIG_LINUX_NETLINK
#define CONFIG_RESTRICTED_PRIVILEGES
#define CONFIG_INCLUDE_SYSPRIV_H "sysdep/linux/syspriv.h"

View File

@@ -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>
@@ -29,10 +28,16 @@
#include "lib/macro.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>