diff --git a/net-mgmt/yaf/Makefile b/net-mgmt/yaf/Makefile index 652b43b456ea..3c8e24c2898f 100644 --- a/net-mgmt/yaf/Makefile +++ b/net-mgmt/yaf/Makefile @@ -1,78 +1,80 @@ PORTNAME= yaf -DISTVERSION= 2.13.0 -PORTREVISION= 1 +DISTVERSION= 2.19.3 CATEGORIES= net-mgmt MASTER_SITES= http://tools.netsa.cert.org/releases/ MAINTAINER= dikshie@sfc.wide.ad.jp COMMENT= Yet Another Flowmeter WWW= https://tools.netsa.cert.org/yaf/index.html LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE_FILE= ${WRKSRC}/LICENSE.txt LIB_DEPENDS= libfixbuf.so:net/libfixbuf \ libltdl.so:devel/libltdl \ libpcap.so:net/libpcap \ - libpcre.so:devel/pcre + libpcre2-8.so:devel/pcre2 GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share INSTALL_TARGET= install-strip USES= gnome libtool pathfix perl5 pkgconfig USE_GNOME= glib20 USE_LDCONFIG= yes CONFIGURE_ARGS= --sysconfdir="${ETCDIR}" PLIST_SUB+= PORTVERSION="${PORTVERSION}" OPTIONS_DEFINE= PAYLOAD APPLABEL PLUGIN FPEXPORT ENTROPY MPLS NONIP IFEXP CMPTIP4 LOCALTIME DNSAUTH DNSNX OPTIONS_DEFAULT= PAYLOAD APPLABEL PLUGIN ENTROPY OPTIONS_SUB= yes PAYLOAD_DESC= YAF will enable reading past IP headers to do deep packet inspection APPLABEL_DESC= Create protocol application labels via traffic header inspection. PLUGIN_DESC= Enable YAF plugins, primary for application labeling. FPEXPORT_DESC= Export of OS fingerprinting information, e.g. p0f. ENTROPY_DESC= Generate Shannon entropy values of the data stream. MPLS_DESC= MPLS capture and export NONIP_DESC= Capture non-IP packets IFEXP_DESC= Export capture interface for DAG/Napatech/Netronome cards. CMPTIP4_DESC= Create compact IPv4 output (no IPv6 support). LOCALTIME_DESC= Allow localtime to be used for command inputs and record printing. Flow records are always in UTC. DNSAUTH_DESC= Modify DNS export to only export Authoritative DNS responses. DNSNX_DESC= Modify DNS export to only export NXDomain responses. PAYLOAD_CONFIGURE_ENABLE= payload APPLABEL_CONFIGURE_ENABLE= applabel PLUGIN_CONFIGURE_ENABLE= plugins FPEXPORT_CONFIGURE_ENABLE= fpexporter ENTROPY_CONFIGURE_ENABLE= entropy MPLS_CONFIGURE_ENABLE= mpls NONIP_CONFIGURE_ENABLE= nonip IFEXP_CONFIGURE_ENABLE= interface CMPTIP4_CONFIGURE_ENABLE= compact-ip4 LOCALTIME_CONFIGURE_ENABLE= localtime DNSAUTH_CONFIGURE_ENABLE= exportDNSAuth DNSNX_CONFIGURE_ENABLE= exportDNSNXDomain APPLABEL_IMPLIES= PAYLOAD DNSAUTH_IMPLIES= PLUGIN APPLABEL DNSNX_IMPLIES= PLUGIN APPLABEL ENTROPY_IMPLIES= PAYLOAD NONIP_IMPLIES= MPLS .include .if defined(WITH_DAG) CONFIGURE_ARGS+= --with-dag=${LOCALBASE} .endif post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/etc/yaf -.for f in dhcp_fingerprints.conf yafApplabelRules.conf yafDPIRules.conf yaf.conf - ${MV} ${STAGEDIR}${PREFIX}/etc/yaf/$f ${STAGEDIR}${PREFIX}/etc/yaf/$f.sample +.for f in dhcp_fingerprints.conf yafApplabelRules.conf yafDPIRules.conf + ${MV} ${STAGEDIR}${ETCDIR}/$f ${STAGEDIR}${ETCDIR}/$f.sample .endfor - ${RM} ${STAGEDIR}${PREFIX}/etc/p0f.fp + ${MV} ${STAGEDIR}${DATADIR}/etc/yaf.conf ${STAGEDIR}${ETCDIR}/yaf.conf.sample + ${MV} ${STAGEDIR}${DATADIR}/yaf.init ${STAGEDIR}${DATADIR}/yaf.init.sample + ${RM} -r ${STAGEDIR}${DATADIR}/etc + ${RM} -r ${STAGEDIR}${DATADIR}/lib + ${RM} -r ${STAGEDIR}${DATADIR}/libexec .include diff --git a/net-mgmt/yaf/distinfo b/net-mgmt/yaf/distinfo index 081bda241a45..9edbb2dffbf6 100644 --- a/net-mgmt/yaf/distinfo +++ b/net-mgmt/yaf/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1683232182 -SHA256 (yaf-2.13.0.tar.gz) = a4c0a7cec4b3e78cde7a9bcd051e3e6bcb88c671494745ac506f1843756a61a3 -SIZE (yaf-2.13.0.tar.gz) = 2198696 +TIMESTAMP = 1782244965 +SHA256 (yaf-2.19.3.tar.gz) = 6b03bc3d25495c01d8d8020b00a908ef1ed28b6edf78f631618208d81e809b30 +SIZE (yaf-2.19.3.tar.gz) = 2299210 diff --git a/net-mgmt/yaf/files/patch-airframe_src_airdaemon.c b/net-mgmt/yaf/files/patch-airframe_src_airdaemon.c index 5cdd71df099b..02acac1a42f0 100644 --- a/net-mgmt/yaf/files/patch-airframe_src_airdaemon.c +++ b/net-mgmt/yaf/files/patch-airframe_src_airdaemon.c @@ -1,13 +1,13 @@ ---- airframe/src/airdaemon.c.orig 2023-02-08 18:37:15 UTC +--- airframe/src/airdaemon.c.orig 2026-03-19 20:13:51 UTC +++ airframe/src/airdaemon.c -@@ -61,6 +61,10 @@ +@@ -43,6 +43,10 @@ #include #include +#ifdef G_OS_UNIX +#include +#endif + static uint32_t ad_retry_min = 30; static uint32_t ad_retry_max = 0; static gboolean ad_nodaemon = FALSE; diff --git a/net-mgmt/yaf/files/patch-airframe_src_filedaemon.c b/net-mgmt/yaf/files/patch-airframe_src_filedaemon.c index edf4f35a8e24..02e4539ada04 100644 --- a/net-mgmt/yaf/files/patch-airframe_src_filedaemon.c +++ b/net-mgmt/yaf/files/patch-airframe_src_filedaemon.c @@ -1,13 +1,13 @@ ---- airframe/src/filedaemon.c.orig 2023-02-08 18:37:15 UTC +--- airframe/src/filedaemon.c.orig 2026-03-19 20:13:51 UTC +++ airframe/src/filedaemon.c -@@ -17,6 +17,10 @@ +@@ -43,6 +43,10 @@ #include #include +#ifdef G_OS_UNIX +#include +#endif + static char *fd_inspec = NULL; static char *fd_outspec = NULL; static char *fd_nextdir = NULL; diff --git a/net-mgmt/yaf/files/patch-include_yaf_decode.h b/net-mgmt/yaf/files/patch-include_yaf_decode.h index 1aea7187cf40..3c457ae7e802 100644 --- a/net-mgmt/yaf/files/patch-include_yaf_decode.h +++ b/net-mgmt/yaf/files/patch-include_yaf_decode.h @@ -1,11 +1,11 @@ ---- include/yaf/decode.h.orig 2023-02-08 18:37:15 UTC +--- include/yaf/decode.h.orig 2026-03-19 20:13:51 UTC +++ include/yaf/decode.h -@@ -218,6 +218,8 @@ typedef struct yfDecodeCtx_st yfDecodeCtx_t; +@@ -203,6 +203,8 @@ typedef struct yfDecodeCtx_st yfDecodeCtx_t; #define YF_PROTO_TCP 6 /** IPv4 Protocol Identifier and IPv6 Next Header for UDP */ #define YF_PROTO_UDP 17 +/** IPv4 Protocol Identifier for tunneled IPv6 */ +#define YF_PROTO_TUNNEL_IP6 41 /** IPv6 Next Header for Routing Options */ #define YF_PROTO_IP6_ROUTE 43 /** IPv6 Next Header for Fragment Options */ diff --git a/net-mgmt/yaf/files/patch-src_decode.c b/net-mgmt/yaf/files/patch-src_decode.c index 2eacb4cd8aa8..62b93f08ff4c 100644 --- a/net-mgmt/yaf/files/patch-src_decode.c +++ b/net-mgmt/yaf/files/patch-src_decode.c @@ -1,15 +1,15 @@ ---- src/decode.c.orig 2023-02-08 18:37:15 UTC +--- src/decode.c.orig 2026-03-19 20:13:51 UTC +++ src/decode.c -@@ -1653,6 +1653,12 @@ yfDecodeIP( +@@ -1855,6 +1855,12 @@ yfDecodeIP( key->dp = 0; } break; + case YF_PROTO_TUNNEL_IP6: + if (!(pkt = yfDecodeIP(ctx, YF_TYPE_IPv6, caplen, pkt, key, iplen, + fraginfo, tcpinfo))) { + return NULL; + } + break; default: /* No layer 4 header we understand. Zero ports. */ key->sp = 0; diff --git a/net-mgmt/yaf/files/patch-src_yaf.pod b/net-mgmt/yaf/files/patch-src_yaf.pod index 41fd91554503..8628ae1b4322 100644 --- a/net-mgmt/yaf/files/patch-src_yaf.pod +++ b/net-mgmt/yaf/files/patch-src_yaf.pod @@ -1,21 +1,21 @@ ---- src/yaf.pod.orig 2023-02-08 19:01:48 UTC -+++ src/yaf.pod -@@ -1633,7 +1633,8 @@ The UNIX timestamp of when the program interacted with +--- src/yaf.pod.in.orig 2026-04-17 21:23:28 UTC ++++ src/yaf.pod.in +@@ -2041,7 +2041,8 @@ flushing any pending flows to the current output, and B responds to B or B by terminating input processing, flushing any pending flows to the current output, and exiting. If B<--verbose> --is given, B responds to B by printing present flow and fragment table +-is given, B responds to B by printing present flow and fragment +is given, B responds to B (and B where available) -+by printing present flow and fragment table - statistics to its log. All other signals are handled by the C runtimes in - the default manner on the platform on which B is currently operating. ++by printing present flow and fragment + table statistics to its log. All other signals are handled by the C runtimes + in the default manner on the platform on which B is currently operating. -@@ -1725,7 +1726,7 @@ See B for more information. +@@ -2151,7 +2152,7 @@ packets is blocking so B will not export statisti - When running B with --live=pfring or --live=zc, the call to receive - packets is blocking so B will not export statistics messages or --respond to SIGUSR1 signals unless it is receiving data. -+respond to B/B signals unless it is receiving data. + When running B with B<--live=pfring> or B<--live=zc>, the call to receive + packets is blocking so B will not export statistics messages or respond +-to SIGUSR1 signals unless it is receiving data. ++to B / B signals unless it is receiving data. - Presently, the B information element contains - ICMP type and code information for ICMP or ICMP6 flows; this is nonstandard + Presently, the B information element contains ICMP + type and code information for ICMP or ICMP6 flows; this is nonstandard and may diff --git a/net-mgmt/yaf/files/patch-src_yafstat.c b/net-mgmt/yaf/files/patch-src_yafstat.c index 22b0530bb040..626da29181e1 100644 --- a/net-mgmt/yaf/files/patch-src_yafstat.c +++ b/net-mgmt/yaf/files/patch-src_yafstat.c @@ -1,41 +1,41 @@ ---- src/yafstat.c.orig 2023-02-08 18:37:15 UTC +--- src/yafstat.c.orig 2026-03-19 20:13:51 UTC +++ src/yafstat.c -@@ -75,7 +75,7 @@ +@@ -57,7 +57,7 @@ #include "yafdag.h" #endif -static uint32_t yaf_do_stat = 0; +static volatile sig_atomic_t yaf_do_stat = 0; static GTimer *yaf_fft = NULL; static yfContext_t *statctx = NULL; -@@ -84,7 +84,7 @@ yfSigUsr1( +@@ -66,7 +66,7 @@ yfSigUsr1( int s) { (void)s; - ++yaf_do_stat; + yaf_do_stat = 1; } -@@ -101,6 +101,11 @@ yfStatInit( +@@ -83,6 +83,11 @@ yfStatInit( if (sigaction(SIGUSR1, &sa, &osa)) { g_error("sigaction(SIGUSR1) failed: %s", strerror(errno)); } +#ifdef SIGINFO + if (sigaction(SIGINFO,&sa,&osa)) { + g_error("sigaction(SIGINFO) failed: %s", strerror(errno)); + } +#endif /* SIGINFO */ /* stash statistics context */ statctx = ctx; -@@ -147,7 +152,7 @@ yfStatDumpLoop( +@@ -152,7 +157,7 @@ yfStatDumpLoop( void) { if (yaf_do_stat) { - --yaf_do_stat; + yaf_do_stat = 0; yfStatDump(); } } diff --git a/net-mgmt/yaf/pkg-plist b/net-mgmt/yaf/pkg-plist index db3e83d722e2..7d4753101e85 100644 --- a/net-mgmt/yaf/pkg-plist +++ b/net-mgmt/yaf/pkg-plist @@ -1,153 +1,162 @@ bin/airdaemon bin/filedaemon bin/getFlowKeyHash bin/yaf bin/yafMeta2Pcap bin/yafcollect bin/yafscii include/airframe/airlock.h include/airframe/airopt.h include/airframe/airutil.h include/airframe/autoinc.h include/airframe/daeconfig.h include/airframe/logconfig.h include/airframe/mio.h include/airframe/mio_config.h include/airframe/mio_sink_file.h include/airframe/mio_sink_multi.h include/airframe/mio_sink_tcp.h include/airframe/mio_sink_udp.h include/airframe/mio_source_file.h include/airframe/mio_source_pcap.h include/airframe/mio_source_tcp.h include/airframe/mio_source_udp.h include/airframe/mio_stdio.h include/airframe/privconfig.h include/yaf/autoinc.h include/yaf/decode.h include/yaf/picq.h include/yaf/ring.h include/yaf/yafcore.h include/yaf/yafhooks.h include/yaf/yafrag.h include/yaf/yaftab.h +include/yaf/yaftime.h lib/libairframe-%%PORTVERSION%%.so.4 lib/libairframe-%%PORTVERSION%%.so.4.0.0 lib/libairframe.so lib/libyaf-%%PORTVERSION%%.so.4 lib/libyaf-%%PORTVERSION%%.so.4.0.0 lib/libyaf.so %%APPLABEL%%lib/yaf/aolplugin.so %%APPLABEL%%lib/yaf/aolplugin.so.1 %%APPLABEL%%lib/yaf/aolplugin.so.1.0.1 %%APPLABEL%%lib/yaf/bgpplugin.so %%APPLABEL%%lib/yaf/bgpplugin.so.1 %%APPLABEL%%lib/yaf/bgpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/dhcp_fp_plugin.so %%APPLABEL%%lib/yaf/dhcp_fp_plugin.so.1 %%APPLABEL%%lib/yaf/dhcp_fp_plugin.so.1.0.1 %%APPLABEL%%lib/yaf/dhcpplugin.so %%APPLABEL%%lib/yaf/dhcpplugin.so.1 %%APPLABEL%%lib/yaf/dhcpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/dnp3plugin.so %%APPLABEL%%lib/yaf/dnp3plugin.so.1 %%APPLABEL%%lib/yaf/dnp3plugin.so.1.0.1 %%APPLABEL%%lib/yaf/dnsplugin.so %%APPLABEL%%lib/yaf/dnsplugin.so.1 %%APPLABEL%%lib/yaf/dnsplugin.so.1.0.1 %%APPLABEL%%lib/yaf/dpacketplugin.so %%APPLABEL%%lib/yaf/dpacketplugin.so.1 %%APPLABEL%%lib/yaf/dpacketplugin.so.1.0.1 %%APPLABEL%%lib/yaf/dumpplugin.so %%APPLABEL%%lib/yaf/dumpplugin.so.1 %%APPLABEL%%lib/yaf/dumpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/ethipplugin.so %%APPLABEL%%lib/yaf/ethipplugin.so.1 %%APPLABEL%%lib/yaf/ethipplugin.so.1.0.1 +%%APPLABEL%%lib/yaf/gh0stplugin.so +%%APPLABEL%%lib/yaf/gh0stplugin.so.1 +%%APPLABEL%%lib/yaf/gh0stplugin.so.1.0.1 +%%APPLABEL%%lib/yaf/imapplugin.so +%%APPLABEL%%lib/yaf/imapplugin.so.1 +%%APPLABEL%%lib/yaf/imapplugin.so.1.0.1 %%APPLABEL%%lib/yaf/ircplugin.so %%APPLABEL%%lib/yaf/ircplugin.so.1 %%APPLABEL%%lib/yaf/ircplugin.so.1.0.1 %%APPLABEL%%lib/yaf/ldapplugin.so %%APPLABEL%%lib/yaf/ldapplugin.so.1 %%APPLABEL%%lib/yaf/ldapplugin.so.1.0.1 %%APPLABEL%%lib/yaf/ldpplugin.so %%APPLABEL%%lib/yaf/ldpplugin.so.1 %%APPLABEL%%lib/yaf/ldpplugin.so.1.0.1 +lib/yaf/libmidencryption.so +lib/yaf/libmidencryption.so.1 +lib/yaf/libmidencryption.so.1.0.1 %%APPLABEL%%lib/yaf/modbusplugin.so %%APPLABEL%%lib/yaf/modbusplugin.so.1 %%APPLABEL%%lib/yaf/modbusplugin.so.1.0.1 %%APPLABEL%%lib/yaf/mysqlplugin.so %%APPLABEL%%lib/yaf/mysqlplugin.so.1 %%APPLABEL%%lib/yaf/mysqlplugin.so.1.0.1 +%%APPLABEL%%lib/yaf/netdgmplugin.so +%%APPLABEL%%lib/yaf/netdgmplugin.so.1 +%%APPLABEL%%lib/yaf/netdgmplugin.so.1.0.1 %%APPLABEL%%lib/yaf/nntpplugin.so %%APPLABEL%%lib/yaf/nntpplugin.so.1 %%APPLABEL%%lib/yaf/nntpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/ntpplugin.so %%APPLABEL%%lib/yaf/ntpplugin.so.1 %%APPLABEL%%lib/yaf/ntpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/nullplugin.so %%APPLABEL%%lib/yaf/nullplugin.so.1 %%APPLABEL%%lib/yaf/nullplugin.so.1.0.1 %%APPLABEL%%lib/yaf/palplugin.so %%APPLABEL%%lib/yaf/palplugin.so.1 %%APPLABEL%%lib/yaf/palplugin.so.1.0.1 %%APPLABEL%%lib/yaf/piplugin.so %%APPLABEL%%lib/yaf/piplugin.so.1 %%APPLABEL%%lib/yaf/piplugin.so.1.0.1 %%APPLABEL%%lib/yaf/pop3plugin.so %%APPLABEL%%lib/yaf/pop3plugin.so.1 %%APPLABEL%%lib/yaf/pop3plugin.so.1.0.1 %%APPLABEL%%lib/yaf/pptpplugin.so %%APPLABEL%%lib/yaf/pptpplugin.so.1 %%APPLABEL%%lib/yaf/pptpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/proxyplugin.so %%APPLABEL%%lib/yaf/proxyplugin.so.1 %%APPLABEL%%lib/yaf/proxyplugin.so.1.0.1 %%APPLABEL%%lib/yaf/rtpplugin.so %%APPLABEL%%lib/yaf/rtpplugin.so.1 %%APPLABEL%%lib/yaf/rtpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/slpplugin.so %%APPLABEL%%lib/yaf/slpplugin.so.1 %%APPLABEL%%lib/yaf/slpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/smtpplugin.so %%APPLABEL%%lib/yaf/smtpplugin.so.1 %%APPLABEL%%lib/yaf/smtpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/snmpplugin.so %%APPLABEL%%lib/yaf/snmpplugin.so.1 %%APPLABEL%%lib/yaf/snmpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/socksplugin.so %%APPLABEL%%lib/yaf/socksplugin.so.1 %%APPLABEL%%lib/yaf/socksplugin.so.1.0.1 +%%APPLABEL%%lib/yaf/sshplugin.so +%%APPLABEL%%lib/yaf/sshplugin.so.1 +%%APPLABEL%%lib/yaf/sshplugin.so.1.0.1 %%APPLABEL%%lib/yaf/teredoplugin.so %%APPLABEL%%lib/yaf/teredoplugin.so.1 %%APPLABEL%%lib/yaf/teredoplugin.so.1.0.1 %%APPLABEL%%lib/yaf/tftpplugin.so %%APPLABEL%%lib/yaf/tftpplugin.so.1 %%APPLABEL%%lib/yaf/tftpplugin.so.1.0.1 %%APPLABEL%%lib/yaf/tlsplugin.so %%APPLABEL%%lib/yaf/tlsplugin.so.1 %%APPLABEL%%lib/yaf/tlsplugin.so.1.0.1 -%%APPLABEL%%lib/yaf/gh0stplugin.so -%%APPLABEL%%lib/yaf/gh0stplugin.so.1 -%%APPLABEL%%lib/yaf/gh0stplugin.so.1.0.1 -%%APPLABEL%%lib/yaf/netdgmplugin.so -%%APPLABEL%%lib/yaf/netdgmplugin.so.1 -%%APPLABEL%%lib/yaf/netdgmplugin.so.1.0.1 @sample %%ETCDIR%%/dhcp_fingerprints.conf.sample @sample %%ETCDIR%%/yafApplabelRules.conf.sample @sample %%ETCDIR%%/yafDPIRules.conf.sample @sample %%ETCDIR%%/yaf.conf.sample -%%DATADIR%%/yaf.init +@sample %%DATADIR%%/yaf.init.sample libdata/pkgconfig/libairframe.pc libdata/pkgconfig/libyaf.pc share/man/man1/airdaemon.1.gz share/man/man1/applabel.1.gz share/man/man1/filedaemon.1.gz share/man/man1/getFlowKeyHash.1.gz share/man/man1/yaf.1.gz +share/man/man1/yaf.init.1.gz share/man/man1/yafMeta2Pcap.1.gz share/man/man1/yafdhcp.1.gz share/man/man1/yafdpi.1.gz share/man/man1/yafscii.1.gz -share/man/man1/yaf.init.1.gz -share/man/man1/yafzcbalance.1.gz