kernel-netlink: Allow Netlink send buffer size to be configured via compile option

The receive buffer size can already be changed via strongswan.conf if
necessary.
This commit is contained in:
Tobias Brunner
2016-02-12 15:08:34 +01:00
parent 10c5981d3b
commit 70934d9436
@@ -20,15 +20,23 @@
#include <linux/rtnetlink.h>
/**
* Default buffer size.
*
* 1024 byte is currently sufficient for all operations.
*/
#ifndef KERNEL_NETLINK_BUFSIZE
#define KERNEL_NETLINK_BUFSIZE 1024
#endif
/**
* General purpose netlink buffer.
*
* 1024 byte is currently sufficient for all operations. Some platform
* require an enforced aligment to four bytes (e.g. ARM).
* Some platforms require an enforced aligment to four bytes (e.g. ARM).
*/
typedef union {
struct nlmsghdr hdr;
u_char bytes[1024];
u_char bytes[KERNEL_NETLINK_BUFSIZE];
} netlink_buf_t __attribute__((aligned(RTA_ALIGNTO)));
typedef struct netlink_socket_t netlink_socket_t;