Index: head/net/zerotier/Makefile =================================================================== --- head/net/zerotier/Makefile (revision 473827) +++ head/net/zerotier/Makefile (revision 473828) @@ -1,38 +1,49 @@ # Created by: Corey Smith # $FreeBSD$ PORTNAME= zerotier -DISTVERSION= 1.2.8 +DISTVERSION= 1.2.10 CATEGORIES= net MAINTAINER= dch@FreeBSD.org COMMENT= Network virtualization everywhere LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.GPL-3 BROKEN_armv6= fails to link: Source object ext/arm32-neon-salsa2012-asm/salsa2012.o has EABI version 0, but target zerotier-one has EABI version 5 BROKEN_armv7= fails to link: Source object ext/arm32-neon-salsa2012-asm/salsa2012.o has EABI version 0, but target zerotier-one has EABI version 5 BROKEN_powerpc64= fails to compile: clang: not found USES= gmake compiler:c11 USE_RC_SUBR= zerotier USE_GITHUB= yes GH_PROJECT= ZeroTierOne CFLAGS+= -flax-vector-conversions OPTIONS_DEFINE= DBG DBG_DESC= Enable foreground debugging for zerotier-one daemon DBG_ALL_TARGET= debug PLIST_FILES= bin/zerotier-cli bin/zerotier-idtool sbin/zerotier-one +.include + +.if ${OPSYS} == "FreeBSD" +# log output via syslog when daemon(8) supports it +.if ((${OSVERSION} >= 1100513 && ${OSVERSION} < 1200000) || ${OSVERSION} >= 1200015) +SUB_LIST+= ZEROTIER_SYSLOG="-s debug -T zerotier" +.else +SUB_LIST+= ZEROTIER_SYSLOG="" +.endif +.endif + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/zerotier-one ${STAGEDIR}${PREFIX}/sbin/ .for l in zerotier-cli zerotier-idtool - ${LN} -sf ../sbin/zerotier-one ${STAGEDIR}${PREFIX}/bin/${l} + ${RLN} ${STAGEDIR}${PREFIX}/sbin/zerotier-one ${STAGEDIR}${PREFIX}/bin/${l} .endfor -.include +.include Index: head/net/zerotier/distinfo =================================================================== --- head/net/zerotier/distinfo (revision 473827) +++ head/net/zerotier/distinfo (revision 473828) @@ -1,3 +1,3 @@ -TIMESTAMP = 1525679369 -SHA256 (zerotier-ZeroTierOne-1.2.8_GH0.tar.gz) = 08e2df34550d6bb68e106eaac48babb481160046818b0944ec41f1e158548a47 -SIZE (zerotier-ZeroTierOne-1.2.8_GH0.tar.gz) = 6009764 +TIMESTAMP = 1529964792 +SHA256 (zerotier-ZeroTierOne-1.2.10_GH0.tar.gz) = 1c79ec57e67764079a77704b336e642ae3cf221dc8088b0cf9e9c81e0a9c0c57 +SIZE (zerotier-ZeroTierOne-1.2.10_GH0.tar.gz) = 6056935 Index: head/net/zerotier/files/zerotier.in =================================================================== --- head/net/zerotier/files/zerotier.in (revision 473827) +++ head/net/zerotier/files/zerotier.in (revision 473828) @@ -1,29 +1,40 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: zerotier -# REQUIRE: FILESYSTEMS netif -# BEFORE: pf ipfw ipfilter +# REQUIRE: FILESYSTEMS devfs +# BEFORE: pf ipfw # KEYWORD: shutdown # # Add these lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # zerotier_enable (bool): Set to NO by default. # Set it to YES to enable zerotier. . /etc/rc.subr name=zerotier rcvar=zerotier_enable load_rc_config $name : ${zerotier_enable:="NO"} -command=%%PREFIX%%/sbin/${name}-one +required_modules="if_tap" -command_args="-d" +pidfile="/var/run/${name}.pid" +start_precmd="install -o root /dev/null ${pidfile}" +command="/usr/sbin/daemon" +command_args=" \ + -c \ + -t ${name} \ + -r \ + -P ${pidfile} \ + %%ZEROTIER_SYSLOG%% \ + /usr/local/sbin/${name}-one" + run_rc_command "$1" + Index: head/net/zerotier/pkg-message =================================================================== --- head/net/zerotier/pkg-message (revision 473827) +++ head/net/zerotier/pkg-message (revision 473828) @@ -1,11 +1,20 @@ ################################# First start the zerotier service: service zerotier start To connect to a zerotier network: zerotier-cli join +If you are running other daemons or require firewall rules to depend on +zerotier interfaces being available at startup, you may need to enable +the following sysctl in /etc/sysctl.conf: + +net.link.tap.up_on_open=1 + +This avoids a race condition where zerotier interfaces are created, but +not up, prior to firewalls and services trying to use them. + #################################