On 2026/01/17 17:20, Sebastian Reitenbach wrote:
commentary inline, updated diff below
> C++ Library: stdc++
alarm bells here, libstdc++ is wrong for amd64
| -V= 2016-07-R1
| -DISTNAME= kismet-${V}
| -PKGNAME= kismet-${V:S,-,,g}
| +V= 2025-09-R1
| +DISTNAME= kismet-${V}
| +PKGNAME= kismet-${V:S,-,,g}
| +CATEGORIES= net security
| CATEGORIES= net security
| -REVISION= 1
|
| -HOMEPAGE= https://www.kismetwireless.net/
| -SITES= ${HOMEPAGE}code/
| -EXTRACT_SUFX= .tar.xz
| +HOMEPAGE= https://www.kismetwireless.net/
| +SITES= ${HOMEPAGE}code/
| +EXTRACT_SUFX= .tar.xz
these replace correct tabs with spaces, should go back to tabs
CATEGORIES is doubled
| -WANTLIB+= c m panel pcap ${COMPILER_LIBCXX} curses util pcre
| -LIB_DEPENDS= devel/pcre
| -RUN_DEPENDS= net/wireshark,-text
| +WANTLIB+= c m pcap ${COMPILER_LIBCXX} util
| +WANTLIB += crypto rtlsdr
| +WANTLIB += pcre2-8 sqlite3 ssl
| +WANTLIB += websockets z atomic usb-1.0
| +WANTLIB += mosquitto
WANTLIB could do with being more neat
libatomic is for GCC, this needs patching (I opted to disable by default
in autoconf and add it for ports-gcc builds; might actually only be
needed on a subset of archs though)
| +LIB_DEPENDS= comms/rtl-sdr \
| + lang/gcc/8,-libs \
gcc libs should not be listed directly. if it's needed e.g. on ports-gcc
archs it should come from the gcc module.
| + net/mosquitto \
| + www/libwebsockets
| +RUN_DEPENDS= comms/rtl_433 \
| + devel/py-protobuf${MODPY_FLAVOR} \
MODPY_FLAVOR is no more
| + net/wireshark,-text \
| + net/py-websockets
|
| .include <bsd.port.arch.mk>
|
| -post-configure:
| - ${SUBST_CMD} ${WRKSRC}/conf/kismet.conf \
| - ${WRKSRC}/man/kismet_drone.conf.5
| - cd ${WRKSRC} && ${GMAKE} depend
| -
| post-install:
| ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/kismet
| - ${INSTALL_DATA} ${WRKSRC}/README \
| + ${INSTALL_DATA} ${WRKSRC}/README.SSL \
| ${PREFIX}/share/doc/kismet
have left for now but I don't think that file is really worth
installing
| @cd ${WRKSRC} && ${GMAKE} binsuidinstall
set INSTALL_TARGET instead
| +- // rtl_433 -F json -M level -d X -f Y [additional]
| +- unsigned int num_args = 9;
| ++ // rtl_433 -F json -M level -s 1024k -d X -f Y [additional]
| ++ unsigned int num_args = 11;
| +
| + // Channel, if any
| + char *channel = NULL;
| +@@ -452,6 +452,8 @@ int open_callback(kis_capture_handler_t *caph, uint32_
| + local433->rtl_argv[n++] = strdup("json");
| + local433->rtl_argv[n++] = strdup("-M");
| + local433->rtl_argv[n++] = strdup("level");
| ++ local433->rtl_argv[n++] = strdup("-s");
| ++ local433->rtl_argv[n++] = strdup("1024k");
I haven't touched this but would it be better to patch in rtl_433?
| +lib/pkgconfig/kismet.pc
I haven't touched this yet, but VERSION is broken, they forgot to run
tools/mkversion.sh before rolling release tarballs
| --- /dev/null 1 Jan 1970 00:00:00 -0000
| +++ pkg/README 17 Jan 2026 16:14:55 -0000
remember to regen PLIST after adding a readme
updated diff below, fixing the above plus a few other little bits, does
this still work for you?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/kismet/Makefile,v
diff -u -p -r1.53 Makefile
--- Makefile 27 Sep 2023 14:18:12 -0000 1.53
+++ Makefile 18 Jan 2026 14:52:55 -0000
@@ -1,16 +1,11 @@
-# Much help came from Alexandre Anriot, Robert Nagy, Bernd Ahlers,
-# and, last but not least, Pedro la Peu.
+DPB_PROPERTIES= parallel
COMMENT= 802.11 layer2 wireless network detector, sniffer, and IDS
-# No wireless capabilities
-NOT_FOR_ARCHS= m88k
-
-V= 2016-07-R1
+V= 2025-09-R1
DISTNAME= kismet-${V}
PKGNAME= kismet-${V:S,-,,g}
CATEGORIES= net security
-REVISION= 1
HOMEPAGE= https://www.kismetwireless.net/
SITES= ${HOMEPAGE}code/
@@ -18,47 +13,52 @@ EXTRACT_SUFX= .tar.xz
MAINTAINER= Sebastian Reitenbach <sebastia@openbsd.org>
-# GPL
+# GPLv2+
PERMIT_PACKAGE= Yes
-COMPILER = base-clang ports-gcc base-gcc
-
-# "old" is required for setting --sysconfdir
-CONFIGURE_STYLE= gnu old
+WANTLIB += ${COMPILER_LIBCXX} c crypto m mosquitto pcap pcre2-8
+WANTLIB += rtlsdr sqlite3 ssl usb-1.0 util websockets z
-CONFDIR= ${SYSCONFDIR}/kismet
-SUBST_VARS+= CONFDIR
+# C++20
+COMPILER= base-clang ports-gcc
-CONFIGURE_ARGS= --sysconfdir=${CONFDIR} \
- --mandir=${PREFIX}/man \
- --with-suidgroup=_kismet
+CONFIGURE_STYLE= autoreconf
+AUTOCONF_VERSION= 2.71
+AUTOMAKE_VERSION= 1.16
+SYSCONFDIR= ${BASESYSCONFDIR}/kismet
-CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
- LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
+CONFIGURE_ARGS= --mandir=${PREFIX}/man \
+ --with-suidgroup=_kismet \
+ --disable-wifi-coconut
-USE_GMAKE= Yes
+LDFLAGS_ports-gcc= -latomic
+LDFLAGS= -L${X11BASE}/lib -L${LOCALBASE}/lib ${LDFLAGS_${CHOSEN_COMPILER}}
-SAMPLES_DIR= ${DESTDIR}${LOCALBASE}/share/examples/kismet
-FAKE_FLAGS+= ETC=${SAMPLES_DIR}
+CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS}"
-# They don't have tests.
-NO_TEST= Yes
+NO_TEST= Yes
+USE_GMAKE= Yes
-WANTLIB+= c m panel pcap ${COMPILER_LIBCXX} curses util pcre
-LIB_DEPENDS= devel/pcre
-RUN_DEPENDS= net/wireshark,-text
+FAKE_FLAGS+= ETC="${WRKINST}${PREFIX}/share/examples/kismet"
-.include <bsd.port.arch.mk>
+LIB_DEPENDS= comms/rtl-sdr \
+ net/mosquitto \
+ www/libwebsockets
+RUN_DEPENDS= comms/rtl_433 \
+ devel/py-protobuf \
+ net/wireshark,-text \
+ net/py-websockets
-post-configure:
- ${SUBST_CMD} ${WRKSRC}/conf/kismet.conf \
- ${WRKSRC}/man/kismet_drone.conf.5
- cd ${WRKSRC} && ${GMAKE} depend
+INSTALL_TARGET= install binsuidinstall
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/kismet
- ${INSTALL_DATA} ${WRKSRC}/README \
+ ${INSTALL_DATA} ${WRKSRC}/README.SSL \
${PREFIX}/share/doc/kismet
- @cd ${WRKSRC} && ${GMAKE} binsuidinstall
.include <bsd.port.mk>
+
+.if ${CHOSEN_COMPILER} == ports-gcc
+WANTLIB += atomic
+.endif
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/kismet/distinfo,v
diff -u -p -r1.9 distinfo
--- distinfo 3 Mar 2019 23:11:04 -0000 1.9
+++ distinfo 18 Jan 2026 14:52:55 -0000
@@ -1,2 +1,2 @@
-SHA256 (kismet-2016-07-R1.tar.xz) = vbIfFTMR8f87FmIb8NZ0D2Y2m/CYKwoonJoSr4hH4jc=
-SIZE (kismet-2016-07-R1.tar.xz) = 709364
+SHA256 (kismet-2025-09-R1.tar.xz) = RwOlitEbd3rwQBmk8bEU7EWRwFqhymucf/V0P/PRSuE=
+SIZE (kismet-2025-09-R1.tar.xz) = 11479700
Index: patches/patch-capture_framework_c
===================================================================
RCS file: patches/patch-capture_framework_c
diff -N patches/patch-capture_framework_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-capture_framework_c 18 Jan 2026 14:52:55 -0000
@@ -0,0 +1,13 @@
+https://github.com/kismetwireless/kismet/pull/590
+
+Index: capture_framework.c
+--- capture_framework.c.orig
++++ capture_framework.c
+@@ -2484,6 +2484,7 @@ void ws_connect_attempt(kis_capture_handler_t *caph) {
+ return;
+ }
+
++ memset(&caph->lwsci, 0, sizeof(struct lws_client_connect_info));
+ caph->lwsci.context = caph->lwscontext;
+ caph->lwsci.port = caph->remote_port;
+ caph->lwsci.address = caph->remote_host;
Index: patches/patch-capture_nrf_51822_nrf_51822_h
===================================================================
RCS file: patches/patch-capture_nrf_51822_nrf_51822_h
diff -N patches/patch-capture_nrf_51822_nrf_51822_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-capture_nrf_51822_nrf_51822_h 18 Jan 2026 14:52:55 -0000
@@ -0,0 +1,14 @@
+https://github.com/kismetwireless/kismet/pull/588
+
+Index: capture_nrf_51822/nrf_51822.h
+--- capture_nrf_51822/nrf_51822.h.orig
++++ capture_nrf_51822/nrf_51822.h
+@@ -66,7 +66,7 @@
+ #define EVENT_PACKET_ADVERTISING 0x02
+ #define EVENT_PACKET_DATA 0x06
+
+-#define D_BAUDRATE B1000000
++#define D_BAUDRATE B460800
+
+ #define _POSIX_SOURCE 1 /* POSIX compliant source */
+
Index: patches/patch-capture_openbsd_wifi_capture_openbsd_wifi_c
===================================================================
RCS file: patches/patch-capture_openbsd_wifi_capture_openbsd_wifi_c
diff -N patches/patch-capture_openbsd_wifi_capture_openbsd_wifi_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-capture_openbsd_wifi_capture_openbsd_wifi_c 18 Jan 2026 14:52:55 -0000
@@ -0,0 +1,60 @@
+https://github.com/kismetwireless/kismet/pull/581
+Index: capture_openbsd_wifi/capture_openbsd_wifi.c
+--- capture_openbsd_wifi/capture_openbsd_wifi.c.orig
++++ capture_openbsd_wifi/capture_openbsd_wifi.c
+@@ -686,7 +686,7 @@ enum wifi_chan_band wifi_freq_to_band(unsigned int in_
+
+ /* Convert a string into a local interpretation; allocate ret_localchan.
+ */
+-void *chantranslate_callback(kis_capture_handler_t *caph, char *chanstr) {
++void *chantranslate_callback(kis_capture_handler_t *caph, const char *chanstr) {
+ local_wifi_t *local_wifi = (local_wifi_t *) caph->userdata;
+ local_channel_t *ret_localchan = NULL;
+ unsigned int parsechan;
+@@ -786,7 +786,7 @@ int chancontrol_callback(kis_capture_handler_t *caph,
+ /* Send a config response with a reconstituted channel if we're
+ * configuring the interface; re-use errstr as a buffer */
+ local_channel_to_str(channel, errstr);
+- cf_send_configresp(caph, seqno, 1, NULL, errstr);
++ cf_send_configresp(caph, seqno, 1, errstr);
+ }
+
+ return 1;
+@@ -794,7 +794,7 @@ int chancontrol_callback(kis_capture_handler_t *caph,
+
+
+ int probe_callback(kis_capture_handler_t *caph, uint32_t seqno, char *definition,
+- char *msg, char **uuid, KismetExternal__Command *frame,
++ char *msg, char **uuid,
+ cf_params_interface_t **ret_interface,
+ cf_params_spectrum_t **ret_spectrum) {
+ return 1;
+@@ -814,7 +814,7 @@ int build_explicit_filters(char **stringmacs, int num_
+
+
+ int open_callback(kis_capture_handler_t *caph, uint32_t seqno, char *definition,
+- char *msg, uint32_t *dlt, char **uuid, KismetExternal__Command *frame,
++ char *msg, uint32_t *dlt, char **uuid,
+ cf_params_interface_t **ret_interface,
+ cf_params_spectrum_t **ret_spectrum) {
+ /* Try to open an interface for monitoring
+@@ -1497,11 +1497,14 @@ void pcap_dispatch_cb(u_char *user, const struct pcap_
+ ts.tv_sec = header->ts.tv_sec;
+ ts.tv_usec = header->ts.tv_usec;
+ while (1) {
+- if ((ret = cf_send_data(caph,
+- NULL, NULL, NULL,
+- ts,
+- local_wifi->datalink_type,
+- header->caplen, (uint8_t *) data)) < 0) {
++ if ((ret = cf_send_data(caph,
++ NULL, 0,
++ NULL, NULL,
++ ts,
++ local_wifi->datalink_type,
++ header->len,
++ header->caplen,
++ (uint8_t *) data)) < 0) {
+ pcap_breakloop(local_wifi->pd);
+ fprintf(stderr, "%s %s/%s could not send packet to Kismet server, terminating.",
+ local_wifi->name, local_wifi->interface, local_wifi->cap_interface);
Index: patches/patch-capture_sdr_rtl433_v2_capture_sdr_rtl433_v2_c
===================================================================
RCS file: patches/patch-capture_sdr_rtl433_v2_capture_sdr_rtl433_v2_c
diff -N patches/patch-capture_sdr_rtl433_v2_capture_sdr_rtl433_v2_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-capture_sdr_rtl433_v2_capture_sdr_rtl433_v2_c 18 Jan 2026 14:52:55 -0000
@@ -0,0 +1,35 @@
+https://github.com/kismetwireless/kismet/pull/593
+https://github.com/kismetwireless/kismet/pull/594
+
+Index: capture_sdr_rtl433_v2/capture_sdr_rtl433_v2.c
+--- capture_sdr_rtl433_v2/capture_sdr_rtl433_v2.c.orig
++++ capture_sdr_rtl433_v2/capture_sdr_rtl433_v2.c
+@@ -342,8 +342,8 @@ int open_callback(kis_capture_handler_t *caph, uint32_
+
+ char buf[STATUS_MAX];
+
+- // rtl_433 -F json -M level -d X -f Y [additional]
+- unsigned int num_args = 9;
++ // rtl_433 -F json -M level -s 1024k -d X -f Y [additional]
++ unsigned int num_args = 11;
+
+ // Channel, if any
+ char *channel = NULL;
+@@ -452,6 +452,8 @@ int open_callback(kis_capture_handler_t *caph, uint32_
+ local433->rtl_argv[n++] = strdup("json");
+ local433->rtl_argv[n++] = strdup("-M");
+ local433->rtl_argv[n++] = strdup("level");
++ local433->rtl_argv[n++] = strdup("-s");
++ local433->rtl_argv[n++] = strdup("1024k");
+ local433->rtl_argv[n++] = strdup("-f");
+ snprintf(buf, STATUS_MAX, "%lu", local433->freq);
+ local433->rtl_argv[n++] = strdup(buf);
+@@ -488,8 +490,6 @@ void capture_thread(kis_capture_handler_t *caph) {
+
+ wrap_cond_wait(&local433->rtl433_valid_cond,
+ &local433->rtl433_valid_cond_mutex);
+- pthread_mutex_unlock(&local433->rtl433_valid_cond_mutex);
+-
+ }
+
+ int main(int argc, char *argv[]) {
Index: patches/patch-capture_sdr_rtladsb_v2_capture_sdr_rtladsb_v2_c
===================================================================
RCS file: patches/patch-capture_sdr_rtladsb_v2_capture_sdr_rtladsb_v2_c
diff -N patches/patch-capture_sdr_rtladsb_v2_capture_sdr_rtladsb_v2_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-capture_sdr_rtladsb_v2_capture_sdr_rtladsb_v2_c 18 Jan 2026 14:52:55 -0000
@@ -0,0 +1,43 @@
+https://github.com/kismetwireless/kismet/pull/591
+
+Index: capture_sdr_rtladsb_v2/capture_sdr_rtladsb_v2.c
+--- capture_sdr_rtladsb_v2/capture_sdr_rtladsb_v2.c.orig
++++ capture_sdr_rtladsb_v2/capture_sdr_rtladsb_v2.c
+@@ -453,13 +453,12 @@ static void rtlsdr_callback(unsigned char *buf, uint32
+ kis_capture_handler_t *caph = (kis_capture_handler_t *) ctx;
+ local_adsb_t *adsb = (local_adsb_t *) caph->userdata;
+
+- if (caph->spindown || adsb->do_exit) {
+- return;
+- }
++ if (caph->spindown || adsb->do_exit) return;
+
++ pthread_mutex_lock(&adsb->ready_mutex);
+ memcpy(adsb->buffer, buf, len);
+-
+- wrap_cond_signal(&adsb->ready, &adsb->ready_mutex);
++ pthread_cond_signal(&adsb->ready);
++ pthread_mutex_unlock(&adsb->ready_mutex);
+ }
+
+ static void *rtlsdr_demod_thread(void *arg) {
+@@ -467,15 +466,16 @@ static void *rtlsdr_demod_thread(void *arg) {
+ local_adsb_t *adsb = (local_adsb_t *) caph->userdata;
+
+ int len;
+-
+ while (!caph->spindown && !adsb->do_exit) {
+- wrap_cond_wait(&adsb->ready, &adsb->ready_mutex);
++ pthread_mutex_lock(&adsb->ready_mutex);
++ pthread_cond_wait(&adsb->ready, &adsb->ready_mutex);
++
+ len = magnitude(caph, adsb->buffer, DEFAULT_BUF_LENGTH);
+ manchester(caph, (uint16_t *) adsb->buffer, len);
+ messages(caph, (uint16_t *) adsb->buffer, len);
++
+ pthread_mutex_unlock(&adsb->ready_mutex);
+ }
+-
+ rtlsdr_cancel_async(adsb->dev);
+ return NULL;
+ }
Index: patches/patch-conf_kismet_conf_in
===================================================================
RCS file: patches/patch-conf_kismet_conf_in
diff -N patches/patch-conf_kismet_conf_in
--- patches/patch-conf_kismet_conf_in 11 Mar 2022 19:46:11 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-Index: conf/kismet.conf.in
---- conf/kismet.conf.in.orig
-+++ conf/kismet.conf.in
-@@ -11,7 +11,7 @@ version=2009-newcore
- # servername=Kismet Server
-
- # Prefix of where we log (as used in the logtemplate later)
--# logprefix=/some/path/to/logs
-+logprefix=${LOCALSTATEDIR}/log/kismet
-
- # Do we process the contents of data frames? If this is enabled, data
- # frames will be truncated to the headers only immediately after frame type
-@@ -30,6 +30,8 @@ allowplugins=true
- # ncsource=wlan0
- # ncsource=wifi0:type=madwifi
- # ncsource=wlan0:name=intel,hop=false,channel=11
-+# Generic OpenBSD example
-+# ncsource=rum0:type=radiotap_bsd
-
- # Comma-separated list of sources to enable. This is only needed if you defined
- # multiple sources and only want to enable some of them. By default, all defined
-@@ -122,10 +124,7 @@ maxbacklog=5000
- # OUI file, expected format 00:11:22<tab>manufname
- # IEEE OUI file used to look up manufacturer info. We default to the
- # wireshark one since most people have that.
--ouifile=/etc/manuf
--ouifile=/usr/share/wireshark/wireshark/manuf
--ouifile=/usr/share/wireshark/manuf
--ouifile=/Applications/Wireshark.app/Contents/Resources/share/wireshark/manuf
-+ouifile=${LOCALBASE}/share/wireshark/manuf
-
- # Do we have a GPS?
- gps=true
-@@ -278,8 +277,8 @@ alertbacklog=50
- logtypes=pcapdump,gpsxml,netxml,nettxt,alert
-
- # Format of the pcap dump (PPI or 80211)
--pcapdumpformat=ppi
--# pcapdumpformat=80211
-+# pcapdumpformat=ppi
-+pcapdumpformat=80211
-
- # Default log title
- logdefault=Kismet
Index: patches/patch-config_h_in
===================================================================
RCS file: patches/patch-config_h_in
diff -N patches/patch-config_h_in
--- patches/patch-config_h_in 11 Mar 2022 19:46:11 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-shut up:
-warning: using directive refers to implicitly-defined namespace 'std'
-
-Index: config.h.in
---- config.h.in.orig
-+++ config.h.in
-@@ -317,6 +317,7 @@
-
- /* Namespace (on non-obj-c files) */
- #ifndef __IN_OBJC_FILE__
-+#include <iosfwd>
- using namespace std;
- #define __STL_USE_NAMESPACES
-
No comments:
Post a Comment