The main improvement of fastd v22 is the L2TP kernel offloading support, which brings fastd’s throughput for unsecured connections on par with other L2TP solutions like Tunneldigger, while maintaining most of fastd’s flexibility. It is even possible to use fast L2TP connections for some peers and secure encryption for others in a single fastd instance. New features¶ * Added new method “null@l2tp” Like the old “null” method, “null@l2tp” doesn’t provide any security. In TAP mode, it uses a packet format compatible with L2TPv3 Ethernet Pseudowires (RFC3931 and RFC4719) for payload data. Using “null@lt2p” for new unsecured deployments and migrating existing “null” setups is recommended for a number of reasons: * “null” uses a 1-byte packet header, which can make data transfer between kernel and userspace slightly slower on platforms that care about alignment * The L2TP-compatible data format facilitates debugging, as packet sniffers like Wireshark can decode the payload * L2TP can be offloaded to the Linux kernel, significantly increasing throughput See offload configuration for information on the setup and limitations of the L2TP offload feature. * Added support for NetBSD (tested on NetBSD 9.2) Bugfixes¶ * Fix build for MacOS This issue was introduced during the move to the Meson build system in fastd v20. * Fix TUN mode crash on FreeBSD/OpenBSD This issue is a regression introduced in fastd v20. The buffer management optimization caused an assertion failure in many configurations upon reading packets from the TUN interface. * Fix version number format When not building from Git, fastd v21 would format its own version number as “21” rather than “v21”, deviating from previous releases. This is fixed with v22. Other changes¶ * A new handshake format has been introduced, prepending an L2TPv3 Control Message header to the actual fastd handshake. This improves certain interactions between fastd and the L2TP kernel module used for offloading. To maintain compatibility with older fastd versions, both handshake formats are accepted. For the initial handshake packet, an old and a new format packet are sent at the same time. Sessions established using the old handshake format are marked with “compat mode” in the log.
76 lines
2 KiB
Makefile
76 lines
2 KiB
Makefile
# $NetBSD: Makefile,v 1.2 2021/08/10 12:36:58 nia Exp $
|
|
|
|
DISTNAME= fastd-22
|
|
CATEGORIES= net
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=NeoRaider/}
|
|
GITHUB_TAG= v${PKGVERSION_NOREV}
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= https://github.com/NeoRaider/fastd
|
|
COMMENT= Fast and small VPN tunnelling daemon
|
|
LICENSE= modified-bsd
|
|
|
|
USE_TOOLS+= bison pkg-config
|
|
|
|
MESON_ARGS+= -Dsystemd=disabled
|
|
|
|
# breaks compatibility with older and embedded x86
|
|
MESON_ARGS+= -Dmac_ghash_pclmulqdq=disabled
|
|
MESON_ARGS+= -Dcipher_salsa20_xmm=disabled
|
|
MESON_ARGS+= -Dcipher_salsa2012_xmm=disabled
|
|
|
|
MESON_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
|
|
|
|
RCD_SCRIPTS= fastd
|
|
|
|
PYTHON_FOR_BUILD_ONLY= tool
|
|
|
|
EGDIR= share/examples/fastd
|
|
|
|
INSTALLATION_DIRS+= ${PKGMANDIR}/man1
|
|
INSTALLATION_DIRS+= ${EGDIR}
|
|
|
|
BUILD_DEFS+= VARBASE
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
PKG_SYSCONFSUBDIR= fastd
|
|
|
|
CONF_FILES+= ${PREFIX}/${EGDIR}/fastd.conf \
|
|
${PKG_SYSCONFDIR}/fastd.conf
|
|
|
|
FASTD_USER?= fastd
|
|
FASTD_GROUP?= fastd
|
|
PKG_GROUPS= ${FASTD_GROUP}
|
|
PKG_USERS= ${FASTD_USER}:${FASTD_GROUP}
|
|
PKG_GROUPS_VARS= FASTD_USER
|
|
PKG_USERS_VARS= FASTD_GROUP
|
|
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR}/peers
|
|
OWN_DIRS_PERMS+= ${VARBASE}/run/fastd \
|
|
${FASTD_USER} ${FASTD_GROUP} 0755
|
|
|
|
SUBST_CLASSES+= paths
|
|
SUBST_STAGE.paths= pre-configure
|
|
SUBST_MESSAGE.paths= Fixing absolute paths.
|
|
SUBST_FILES.paths= fastd.conf
|
|
SUBST_VARS.paths= PREFIX VARBASE PKG_SYSCONFDIR
|
|
SUBST_VARS.paths+= FASTD_USER FASTD_GROUP
|
|
|
|
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
|
|
|
|
post-extract:
|
|
${CP} ${FILESDIR}/fastd.conf ${WRKSRC}/fastd.conf
|
|
|
|
post-install:
|
|
${INSTALL_MAN} ${WRKSRC}/doc/fastd.1 \
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/fastd.1
|
|
${INSTALL_MAN} ${WRKSRC}/fastd.conf \
|
|
${DESTDIR}${PREFIX}/${EGDIR}/fastd.conf
|
|
|
|
.include "../../devel/meson/build.mk"
|
|
.include "../../security/libsodium/buildlink3.mk"
|
|
.include "../../security/libuecc/buildlink3.mk"
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
.include "../../textproc/json-c/buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|