include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
-PKG_VERSION:=4.3.1
+PKG_VERSION:=4.4.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/syslog-ng/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=999dbab62982c3cffba02c0be22c596ee1ce81d6954689dc9b3a6afeb513cce3
+PKG_HASH:=583b147f3ec17fbc2dbbf31aafb1e3966237d7541313de5b41ea885dc16d932e
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
# More details about these settings can be found here:
# https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
-@version: 4.3
+@version: 4.4
@include "scl.conf"
options {
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git
-PKG_SOURCE_VERSION:=0.8.2-1
-PKG_MIRROR_HASH:=3a7c8fcd76389970671bc8d07fe7a06225e537850b1ad209dda436fb3b5ea0cb
+PKG_SOURCE_VERSION:=0.8.5-1
+PKG_MIRROR_HASH:=d2875aa9b87a80c71d57e2b29c8e882b41aa81f995043e0fbae9a642250ab1c7
PKG_MAINTAINER:=Amnon Paz <pazamnon@gmail.com>
PKG_LICENSE:=MIT
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -8,7 +8,6 @@ option(BUILD_SHARED_LUA_OPENSSL "Shared
+@@ -8,10 +8,7 @@ option(BUILD_SHARED_LUA_OPENSSL "Shared
include(GNUInstallDirs)
-find_package(LuaJIT)
- if(NOT LUAJIT_FOUND)
- find_package(Lua REQUIRED)
- endif()
+-if(NOT LUAJIT_FOUND)
+- find_package(Lua REQUIRED)
+-endif()
++find_package(Lua REQUIRED)
+ find_package(OpenSSL REQUIRED)
+
+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cffi
-PKG_VERSION:=1.15.1
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PYPI_NAME:=cffi
-PKG_HASH:=d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9
+PKG_HASH:=bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
DEPENDS:= \
+libffi \
+python3-light \
+ +python3-ctypes \
+python3-pycparser
endef
--- /dev/null
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -2,6 +2,6 @@
+ requires = [
+ # first version that supports Python 3.12; older versions may work
+ # with previous Python versions, but are not tested
+- "setuptools >= 66.1"
++ "setuptools"
+ ]
+ build-backend = "setuptools.build_meta"
--- /dev/null
+#!/bin/sh
+
+[ "$1" = python3-cffi ] || exit 0
+
+python3 - << EOF
+from cffi import FFI
+ffibuilder = FFI()
+EOF
include $(TOPDIR)/rules.mk
PKG_NAME:=python-charset-normalizer
-PKG_VERSION:=3.2.0
+PKG_VERSION:=3.3.0
PKG_RELEASE:=1
PYPI_NAME:=charset-normalizer
-PKG_HASH:=3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace
+PKG_HASH:=63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
--- /dev/null
+#!/bin/sh
+
+[ "$1" = python3-charset-normalizer ] || exit 0
+
+python3 - << EOF
+import sys
+from charset_normalizer import from_bytes
+s = 'Bсеки човек има право на образование.'
+byte_str = s.encode('cp1251')
+result = from_bytes(byte_str).best()
+sys.exit(0 if str(result) == s else 1)
+EOF
include $(TOPDIR)/rules.mk
PKG_NAME:=python-packaging
-PKG_VERSION:=23.1
+PKG_VERSION:=23.2
PKG_RELEASE:=1
PYPI_NAME:=packaging
-PKG_HASH:=a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f
+PKG_HASH:=048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>, Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=Apache-2.0 BSD-2-Clause
SUBMENU:=Python
TITLE:=Core utilities for Python packages
URL:=https://github.com/pypa/packaging
- DEPENDS:=+python3-light +python3-logging +python3-urllib
+ DEPENDS:=+python3-light +python3-email +python3-logging +python3-urllib
endef
define Package/python3-packaging/description
--- /dev/null
+#!/bin/sh
+
+[ "$1" = python3-packaging ] || exit 0
+
+python3 - << EOF
+import sys
+from packaging.version import Version, parse
+v1 = parse("1.0a5")
+v2 = Version("1.0")
+sys.exit(0 if v1 < v2 else 1)
+EOF
config FFMPEG_CUSTOM_MUXER_ac3
bool "AC3"
+config FFMPEG_CUSTOM_MUXER_avi
+ bool "AVI"
+
config FFMPEG_CUSTOM_MUXER_h264
bool "H.264 Raw Video"
depends on FFMPEG_CUSTOM_PATENTED
PKG_NAME:=ffmpeg
PKG_VERSION:=5.1.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
FFMPEG_CUSTOM_MUXERS:= \
ac3 \
+ avi \
ffm \
h264 \
hevc \
PKG_NAME:=adblock-fast
PKG_VERSION:=1.0.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
PKG_LICENSE:=GPL-3.0-or-later
readonly hostsFilter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
readonly domainsFilter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
readonly adBlockPlusFilter='/^#/d;/^!/d;s/[[:space:]]*#.*$//;s/^||//;s/\^$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
-readonly dnsmasqFileFilter='\|^server=/[[:alnum:]_.-].*/|!d'
-readonly dnsmasq2FileFilter='\|^local=/[[:alnum:]_.-].*/|!d'
+readonly dnsmasqFileFilter='\|^server=/[[:alnum:]_.-].*/|!d;s|server=/||;s|/.*$||'
+readonly dnsmasq2FileFilter='\|^local=/[[:alnum:]_.-].*/|!d;s|local=/||;s|/.*$||'
+readonly dnsmasq3FileFilter='\|^address=/[[:alnum:]_.-].*/|!d;s|address=/||;s|/.*$||'
readonly _OK_='\033[0;32m\xe2\x9c\x93\033[0m'
readonly _FAIL_='\033[0;31m\xe2\x9c\x97\033[0m'
readonly __OK__='\033[0;32m[\xe2\x9c\x93]\033[0m'
echo 'dnsmasq'
elif grep -q '^local=' "$file"; then
echo 'dnsmasq2'
+ elif grep -q '^address=' "$file"; then
+ echo 'dnsmasq3'
elif grep -q '^0.0.0.0' "$file" || grep -q '^127.0.0.1' "$file"; then
echo 'hosts'
elif [ -n "$(sed "$domainsFilter" "$file" | head -1)" ]; then
adblockplus) filter="$adBlockPlusFilter";;
dnsmasq) filter="$dnsmasqFileFilter";;
dnsmasq2) filter="$dnsmasq2FileFilter";;
+ dnsmasq3) filter="$dnsmasq3FileFilter";;
domains) filter="$domainsFilter";;
hosts) filter="$hostsFilter";;
*)
return 0
;;
esac
- sed -i "$filter" "$R_TMP"
+ if [ -n "$filter" ] && [ "$action" != 'file' ]; then
+ sed -i "$filter" "$R_TMP"
+ fi
if [ ! -s "$R_TMP" ]; then
output 1 "$_FAIL_"
output 2 "[DL] $type $label ($format) $__FAIL__\\n"
mv "$A_TMP" "$B_TMP"
fi
- output 2 'Allowing domains '
- json set message "$(get_text "statusProcessing"): allowing domains"
- if sed -i -E "$allow_filter" "$B_TMP"; then
- output_ok
- else
- output_failn
- json add error "errorAllowListProcessing"
+ if [ -n "$allow_filter" ]; then
+ output 2 'Allowing domains '
+ json set message "$(get_text "statusProcessing"): allowing domains"
+ if sed -i -E "$allow_filter" "$B_TMP"; then
+ output_ok
+ else
+ output_failn
+ json add error "errorAllowListProcessing"
+ fi
fi
-
output 2 'Formatting merged file '
json set message "$(get_text "statusProcessing"): formatting merged file"
if [ -z "$outputFilterIPv6" ]; then
include $(TOPDIR)/rules.mk
PKG_NAME:=aircrack-ng
-PKG_VERSION:=1.6
-PKG_RELEASE:=3
+PKG_VERSION:=1.7
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:aircrack-ng:aircrack-ng
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.aircrack-ng.org/
-PKG_HASH:=4f0bfd486efc6ea7229f7fbc54340ff8b2094a0d73e9f617e0a39f878999a247
+PKG_HASH:=05a704e3c8f7792a17315080a21214a4448fd2452c1b0dd5226a3a55f90b58c3
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
define Package/aircrack-ng
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread +libstdcpp
+ DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre2 +libpthread +libstdcpp
DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
--- /dev/null
+From 6b05dc10cdcf45d50bc8f9dd74667a3ff399a059 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:52:12 +0100
+Subject: [PATCH 1/9] autotools: add PCRE2 detection
+
+---
+ build/m4/aircrack_ng_pcre2.m4 | 61 +++++++++++++++++++++++++++++++++++
+ configure.ac | 2 ++
+ 2 files changed, 63 insertions(+)
+ create mode 100644 build/m4/aircrack_ng_pcre2.m4
+
+--- /dev/null
++++ b/build/m4/aircrack_ng_pcre2.m4
+@@ -0,0 +1,61 @@
++dnl Aircrack-ng
++dnl
++dnl Copyright (C) 2023 Andras Gemes <andrasgemes@outlook.com>
++dnl
++dnl Autotool support was written by: Joseph Benden <joe@benden.us>
++dnl
++dnl This program is free software; you can redistribute it and/or modify
++dnl it under the terms of the GNU General Public License as published by
++dnl the Free Software Foundation; either version 2 of the License, or
++dnl (at your option) any later version.
++dnl
++dnl This program is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++dnl GNU General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU General Public License
++dnl along with this program; if not, write to the Free Software
++dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
++dnl
++dnl In addition, as a special exception, the copyright holders give
++dnl permission to link the code of portions of this program with the
++dnl OpenSSL library under certain conditions as described in each
++dnl individual source file, and distribute linked combinations
++dnl including the two.
++dnl
++dnl You must obey the GNU General Public License in all respects
++dnl for all of the code used other than OpenSSL.
++dnl
++dnl If you modify file(s) with this exception, you may extend this
++dnl exception to your dnl version of the file(s), but you are not obligated
++dnl to do so.
++dnl
++dnl If you dnl do not wish to do so, delete this exception statement from your
++dnl version.
++dnl
++dnl If you delete this exception statement from all source files in the
++dnl program, then also delete it here.
++
++AC_DEFUN([AIRCRACK_NG_PCRE2], [
++AC_ARG_ENABLE(static-pcre2,
++ AS_HELP_STRING([--enable-static-pcre2],
++ [Enable statically linked PCRE2 libpcre2-8.]),
++ [static_pcre2=$enableval], [static_pcre2=no])
++
++if test "x$static_pcre2" != "xno"; then
++ AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT])
++ AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version)
++ if test "x$PCRE2_FOUND" = xyes; then
++ HAVE_PCRE2=yes
++ else
++ HAVE_PCRE2=no
++ fi
++else
++ PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no)
++fi
++
++AS_IF([test "x$HAVE_PCRE2" = "xyes"], [
++ AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
++])
++])
+\ No newline at end of file
+--- a/configure.ac
++++ b/configure.ac
+@@ -144,6 +144,7 @@ AIRCRACK_NG_EXT_SCRIPTS
+ AIRCRACK_NG_HWLOC
+ AIRCRACK_NG_PCAP
+ AIRCRACK_NG_PCRE
++AIRCRACK_NG_PCRE2
+ AIRCRACK_NG_RFKILL
+ AIRCRACK_NG_SQLITE
+ AIRCRACK_NG_ZLIB
+@@ -320,6 +321,7 @@ ${PACKAGE} ${VERSION}
+ Jemalloc: ${JEMALLOC}
+ Pcap: ${PCAP_FOUND}
+ Pcre: ${HAVE_PCRE}
++ Pcre2: ${HAVE_PCRE2}
+ Sqlite: ${HAVE_SQLITE3}
+ Tcmalloc: ${TCMALLOC}
+ Zlib: ${HAVE_ZLIB}
--- /dev/null
+From 37bc38a1749f61f3e54dbebca7b33df844b6de82 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:53:59 +0100
+Subject: [PATCH 2/9] airodump-ng: add PCRE2 support
+
+---
+ src/airodump-ng/airodump-ng.c | 75 +++++++++++++++++++++++++++++++----
+ 1 file changed, 67 insertions(+), 8 deletions(-)
+
+--- a/src/airodump-ng/airodump-ng.c
++++ b/src/airodump-ng/airodump-ng.c
+@@ -68,7 +68,10 @@
+
+ #include <sys/wait.h>
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++#elif defined HAVE_PCRE
+ #include <pcre.h>
+ #endif
+
+@@ -150,7 +153,10 @@ static struct local_options
+ unsigned char prev_bssid[6];
+ char ** f_essid;
+ int f_essid_count;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ pcre2_code * f_essid_regex;
++ pcre2_match_data * f_essid_match_data;
++#elif defined HAVE_PCRE
+ pcre * f_essid_regex;
+ #endif
+ char * dump_prefix;
+@@ -784,7 +790,7 @@ static const char usage[] =
+ " --netmask <netmask> : Filter APs by mask\n"
+ " --bssid <bssid> : Filter APs by BSSID\n"
+ " --essid <essid> : Filter APs by ESSID\n"
+-#ifdef HAVE_PCRE
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ " --essid-regex <regex> : Filter APs by ESSID using a regular\n"
+ " expression\n"
+ #endif
+@@ -857,7 +863,22 @@ int is_filtered_essid(const uint8_t * es
+ ret = 1;
+ }
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ if (lopt.f_essid_regex)
++ {
++ lopt.f_essid_match_data
++ = pcre2_match_data_create_from_pattern(lopt.f_essid_regex, NULL);
++
++ return pcre2_match(lopt.f_essid_regex,
++ (PCRE2_SPTR) essid,
++ (int) strnlen((char *) essid, ESSID_LENGTH),
++ 0,
++ 0,
++ lopt.f_essid_match_data,
++ 0)
++ < 0;
++ }
++#elif defined HAVE_PCRE
+ if (lopt.f_essid_regex)
+ {
+ return pcre_exec(lopt.f_essid_regex,
+@@ -5782,7 +5803,10 @@ int main(int argc, char * argv[])
+ int wi_read_failed = 0;
+ int n = 0;
+ int output_format_first_time = 1;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ int pcreerror;
++ PCRE2_SIZE pcreerroffset;
++#elif defined HAVE_PCRE
+ const char * pcreerror;
+ int pcreerroffset;
+ #endif
+@@ -5938,7 +5962,9 @@ int main(int argc, char * argv[])
+ #ifdef CONFIG_LIBNL
+ lopt.htval = CHANNEL_NO_HT;
+ #endif
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ lopt.f_essid_regex = NULL;
++#elif defined HAVE_PCRE
+ lopt.f_essid_regex = NULL;
+ #endif
+
+@@ -6359,7 +6385,34 @@ int main(int argc, char * argv[])
+
+ case 'R':
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ if (lopt.f_essid_regex != NULL)
++ {
++ printf("Error: ESSID regular expression already given. "
++ "Aborting\n");
++ exit(EXIT_FAILURE);
++ }
++
++ lopt.f_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
++ PCRE2_ZERO_TERMINATED,
++ 0,
++ &pcreerror,
++ &pcreerroffset,
++ NULL);
++
++ if (lopt.f_essid_regex == NULL)
++ {
++ PCRE2_UCHAR pcreerrbuffer[256];
++ pcre2_get_error_message(
++ pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
++
++ printf("Error: regular expression compilation failed at "
++ "offset %lu: %s; aborting\n",
++ pcreerroffset,
++ pcreerrbuffer);
++ exit(EXIT_FAILURE);
++ }
++#elif defined HAVE_PCRE
+ if (lopt.f_essid_regex != NULL)
+ {
+ printf("Error: ESSID regular expression already given. "
+@@ -7297,7 +7350,13 @@ int main(int argc, char * argv[])
+
+ if (lopt.keyout) free(lopt.keyout);
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ if (lopt.f_essid_regex)
++ {
++ pcre2_match_data_free(lopt.f_essid_match_data);
++ pcre2_code_free(lopt.f_essid_regex);
++ }
++#elif defined HAVE_PCRE
+ if (lopt.f_essid_regex) pcre_free(lopt.f_essid_regex);
+ #endif
+
--- /dev/null
+From dbc80d96cfba2dab959ab20bf76f8dd4f517bd29 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:55:18 +0100
+Subject: [PATCH 3/9] besside-ng: add PCRE2 support
+
+---
+ src/besside-ng/besside-ng.c | 86 ++++++++++++++++++++++++++++++++++---
+ 1 file changed, 79 insertions(+), 7 deletions(-)
+
+--- a/src/besside-ng/besside-ng.c
++++ b/src/besside-ng/besside-ng.c
+@@ -57,7 +57,10 @@
+ #include <unistd.h>
+ #include <limits.h>
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++#elif defined HAVE_PCRE
+ #include <pcre.h>
+ #endif
+
+@@ -155,7 +158,10 @@ static struct conf
+ int cf_do_wep;
+ int cf_do_wpa;
+ char * cf_wpa_server;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ pcre2_code * cf_essid_regex;
++ pcre2_match_data * cf_essid_match_data;
++#elif defined HAVE_PCRE
+ pcre * cf_essid_regex;
+ #endif
+ } _conf;
+@@ -1116,7 +1122,31 @@ static void attack_ping(void * a)
+ timer_in(100 * 1000, attack_ping, n);
+ }
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++static int is_filtered_essid(char * essid)
++{
++ REQUIRE(essid != NULL);
++
++ int ret = 0;
++
++ if (_conf.cf_essid_regex)
++ {
++ _conf.cf_essid_match_data
++ = pcre2_match_data_create_from_pattern(_conf.cf_essid_regex, NULL);
++
++ return pcre2_match(_conf.cf_essid_regex,
++ (PCRE2_SPTR) essid,
++ (int) strnlen((char *) essid, MAX_IE_ELEMENT_SIZE),
++ 0,
++ 0,
++ _conf.cf_essid_match_data,
++ 0)
++ < 0;
++ }
++
++ return (ret);
++}
++#elif defined HAVE_PCRE
+ static int is_filtered_essid(char * essid)
+ {
+ REQUIRE(essid != NULL);
+@@ -1148,7 +1178,12 @@ static int should_attack(struct network
+ if (_conf.cf_bssid && memcmp(_conf.cf_bssid, n->n_bssid, 6) != 0)
+ return (0);
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ if (is_filtered_essid(n->n_ssid))
++ {
++ return (0);
++ }
++#elif defined HAVE_PCRE
+ if (is_filtered_essid(n->n_ssid))
+ {
+ return (0);
+@@ -3007,7 +3042,13 @@ static void cleanup(int UNUSED(x))
+
+ print_work();
+
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ if (_conf.cf_essid_regex)
++ {
++ pcre2_match_data_free(_conf.cf_essid_match_data);
++ pcre2_code_free(_conf.cf_essid_regex);
++ }
++#elif defined HAVE_PCRE
+ if (_conf.cf_essid_regex) pcre_free(_conf.cf_essid_regex);
+ #endif
+
+@@ -3295,7 +3336,10 @@ static void usage(char * prog)
+ int main(int argc, char * argv[])
+ {
+ int ch, temp;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ int pcreerror;
++ PCRE2_SIZE pcreerroffset;
++#elif defined HAVE_PCRE
+ const char * pcreerror;
+ int pcreerroffset;
+ #endif
+@@ -3349,7 +3393,35 @@ int main(int argc, char * argv[])
+ break;
+
+ case 'R':
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++ if (_conf.cf_essid_regex != NULL)
++ {
++ printf("Error: ESSID regular expression already given. "
++ "Aborting\n");
++ exit(EXIT_FAILURE);
++ }
++
++ _conf.cf_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
++ PCRE2_ZERO_TERMINATED,
++ 0,
++ &pcreerror,
++ &pcreerroffset,
++ NULL);
++
++ if (_conf.cf_essid_regex == NULL)
++ {
++ PCRE2_UCHAR pcreerrbuffer[256];
++ pcre2_get_error_message(
++ pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
++
++ printf("Error: regular expression compilation failed at "
++ "offset %lu: %s; aborting\n",
++ pcreerroffset,
++ pcreerrbuffer);
++ exit(EXIT_FAILURE);
++ }
++ break;
++#elif defined HAVE_PCRE
+ if (_conf.cf_essid_regex != NULL)
+ {
+ printf("Error: ESSID regular expression already given. "
--- /dev/null
+From ca05a44c449be3c433ea67c04f11d544ab62395f Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:57:16 +0100
+Subject: [PATCH 4/9] makefile: add PCRE2 to linker flags
+
+---
+ src/Makefile.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/Makefile.inc
++++ b/src/Makefile.inc
+@@ -130,7 +130,7 @@ aireplay_ng_LDADD = $(COMMON_LDADD) $(L
+ airodump_ng_SOURCES = $(SRC_ADU) $(SRC_DWRITE)
+ airodump_ng_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
+ airodump_ng_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_srcdir)/src/airodump-ng
+-airodump_ng_LDADD = $(COMMON_LDADD) $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_CE_WEP_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
++airodump_ng_LDADD = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_CE_WEP_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+
+ airserv_ng_SOURCES = $(SRC_AS)
+ airserv_ng_CFLAGS = $(COMMON_CFLAGS) $(LIBNL_CFLAGS)
+@@ -164,7 +164,7 @@ buddy_ng_LDADD = $(COMMON_LDADD) $(LIBA
+
+ besside_ng_SOURCES = $(SRC_BS)
+ besside_ng_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
+-besside_ng_LDADD = $(COMMON_LDADD) $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBPTW_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
++besside_ng_LDADD = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBPTW_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+
+ besside_ng_crawler_SOURCES = $(SRC_BC)
+ besside_ng_crawler_CFLAGS = $(COMMON_CFLAGS) $(PCAP_CFLAGS)
--- /dev/null
+From fa532b05d48e856c774837b83a3323dafcc8c33e Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:58:35 +0100
+Subject: [PATCH 5/9] airodump-ng/dump_write: remove unused PCRE include
+
+---
+ src/airodump-ng/dump_write.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/src/airodump-ng/dump_write.c
++++ b/src/airodump-ng/dump_write.c
+@@ -45,9 +45,6 @@
+ #include <unistd.h> // ftruncate
+ #include <sys/types.h> // ftruncate
+ #include <sys/time.h>
+-#ifdef HAVE_PCRE
+-#include <pcre.h>
+-#endif
+
+ #include "aircrack-ng/defs.h"
+ #include "airodump-ng.h"
--- /dev/null
+From bac9b5fed2bb29e13326c90d7c12a6936fe9f04b Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Sat, 21 Jan 2023 19:29:58 +0100
+Subject: [PATCH 7/9] compat-pcre: add compat-type PCRE header
+
+---
+ include/Makefile.inc | 1 +
+ include/aircrack-ng/pcre/compat-pcre.h | 90 ++++++++++++++++++++++++++
+ 2 files changed, 91 insertions(+)
+ create mode 100644 include/aircrack-ng/pcre/compat-pcre.h
+
+--- a/include/Makefile.inc
++++ b/include/Makefile.inc
+@@ -71,6 +71,7 @@ nobase_aircrack_HEADERS = %D%/aircrack-
+ %D%/aircrack-ng/osdep/network.h \
+ %D%/aircrack-ng/osdep/osdep.h \
+ %D%/aircrack-ng/osdep/packed.h \
++ %D%/aircrack-ng/pcre/compat-pcre.h \
+ %D%/aircrack-ng/ptw/aircrack-ptw-lib.h \
+ %D%/aircrack-ng/support/common.h \
+ %D%/aircrack-ng/support/communications.h \
+--- /dev/null
++++ b/include/aircrack-ng/pcre/compat-pcre.h
+@@ -0,0 +1,90 @@
++/*
++* Copyright (C) 2023 Andras Gemes <andrasgemes@outlook.com>
++*
++* This program is free software; you can redistribute it and/or modify
++* it under the terms of the GNU General Public License as published by
++* the Free Software Foundation; either version 2 of the License, or
++* (at your option) any later version.
++*
++* This program is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++* GNU General Public License for more details.
++*
++* You should have received a copy of the GNU General Public License
++* along with this program; if not, write to the Free Software
++* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
++*
++*
++* In addition, as a special exception, the copyright holders give
++* permission to link the code of portions of this program with the
++* OpenSSL library under certain conditions as described in each
++* individual source file, and distribute linked combinations
++* including the two.
++* You must obey the GNU General Public License in all respects
++* for all of the code used other than OpenSSL. * If you modify
++* file(s) with this exception, you may extend this exception to your
++* version of the file(s), but you are not obligated to do so. * If you
++* do not wish to do so, delete this exception statement from your
++* version. * If you delete this exception statement from all source
++* files in the program, then also delete it here.
++*/
++
++#ifndef AIRCRACK_NG_COMPAT_PCRE_H
++#define AIRCRACK_NG_COMPAT_PCRE_H
++
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++#elif defined HAVE_PCRE
++#include <pcre.h>
++#endif
++
++#ifdef HAVE_PCRE2
++#define COMPAT_PCRE_COMPILE(pattern, pcreerror, pcreerroffset) \
++ pcre2_compile((PCRE2_SPTR) (pattern), \
++ PCRE2_ZERO_TERMINATED, \
++ 0, \
++ (pcreerror), \
++ (pcreerroffset), \
++ NULL)
++#elif defined HAVE_PCRE
++#define COMPAT_PCRE_COMPILE(pattern, pcreerror, pcreerroffset) \
++ pcre_compile((pattern), 0, (pcreerror), (pcreerroffset), NULL)
++#endif
++
++#ifdef HAVE_PCRE2
++#define COMPAT_PCRE_MATCH(regex, essid, length, match_data) \
++ pcre2_match((regex), \
++ (PCRE2_SPTR) (essid), \
++ (int) strnlen((char *) (essid), (length)), \
++ 0, \
++ 0, \
++ (match_data), \
++ 0)
++#elif defined HAVE_PCRE
++#define COMPAT_PCRE_MATCH(regex, essid, length, match_data) \
++ pcre_exec((regex), \
++ NULL, \
++ (char *) (essid), \
++ strnlen((char *) (essid), (length)), \
++ 0, \
++ 0, \
++ NULL, \
++ 0)
++#endif
++
++#ifdef HAVE_PCRE2
++#define COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerr) \
++ printf("Error: regular expression compilation failed at " \
++ "offset %zu: %s; aborting\n", \
++ (pcreerroffset), \
++ (pcreerr))
++#elif defined HAVE_PCRE
++#define COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerrorbuf) \
++ printf("Error: regular expression compilation failed at " \
++ "offset %d: %s; aborting\n", \
++ (pcreerroffset), \
++ (pcreerrorbuf))
++#endif
++#endif //AIRCRACK_NG_COMPAT_PCRE_H
--- /dev/null
+From e7ace80dbcfd2feecbbc6263ce59ce20acdafca0 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Sat, 21 Jan 2023 19:31:07 +0100
+Subject: [PATCH 8/9] airodump-ng: utilize compat-pcre
+
+---
+ src/airodump-ng/airodump-ng.c | 80 +++++++++--------------------------
+ 1 file changed, 19 insertions(+), 61 deletions(-)
+
+--- a/src/airodump-ng/airodump-ng.c
++++ b/src/airodump-ng/airodump-ng.c
+@@ -68,13 +68,7 @@
+
+ #include <sys/wait.h>
+
+-#ifdef HAVE_PCRE2
+-#define PCRE2_CODE_UNIT_WIDTH 8
+-#include <pcre2.h>
+-#elif defined HAVE_PCRE
+-#include <pcre.h>
+-#endif
+-
++#include "aircrack-ng/pcre/compat-pcre.h"
+ #include "aircrack-ng/defs.h"
+ #include "aircrack-ng/version.h"
+ #include "aircrack-ng/support/pcap_local.h"
+@@ -863,33 +857,22 @@ int is_filtered_essid(const uint8_t * es
+ ret = 1;
+ }
+
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ if (lopt.f_essid_regex)
+ {
++#ifdef HAVE_PCRE2
+ lopt.f_essid_match_data
+ = pcre2_match_data_create_from_pattern(lopt.f_essid_regex, NULL);
+
+- return pcre2_match(lopt.f_essid_regex,
+- (PCRE2_SPTR) essid,
+- (int) strnlen((char *) essid, ESSID_LENGTH),
+- 0,
+- 0,
+- lopt.f_essid_match_data,
+- 0)
++ return COMPAT_PCRE_MATCH(lopt.f_essid_regex,
++ essid,
++ ESSID_LENGTH,
++ lopt.f_essid_match_data)
+ < 0;
+- }
+ #elif defined HAVE_PCRE
+- if (lopt.f_essid_regex)
+- {
+- return pcre_exec(lopt.f_essid_regex,
+- NULL,
+- (char *) essid,
+- (int) strnlen((char *) essid, ESSID_LENGTH),
+- 0,
+- 0,
+- NULL,
+- 0)
++ return COMPAT_PCRE_MATCH(lopt.f_essid_regex, essid, ESSID_LENGTH, NULL)
+ < 0;
++#endif
+ }
+ #endif
+
+@@ -5805,6 +5788,7 @@ int main(int argc, char * argv[])
+ int output_format_first_time = 1;
+ #ifdef HAVE_PCRE2
+ int pcreerror;
++ PCRE2_UCHAR pcreerrorbuf[256];
+ PCRE2_SIZE pcreerroffset;
+ #elif defined HAVE_PCRE
+ const char * pcreerror;
+@@ -5962,9 +5946,7 @@ int main(int argc, char * argv[])
+ #ifdef CONFIG_LIBNL
+ lopt.htval = CHANNEL_NO_HT;
+ #endif
+-#ifdef HAVE_PCRE2
+- lopt.f_essid_regex = NULL;
+-#elif defined HAVE_PCRE
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ lopt.f_essid_regex = NULL;
+ #endif
+
+@@ -6385,7 +6367,7 @@ int main(int argc, char * argv[])
+
+ case 'R':
+
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ if (lopt.f_essid_regex != NULL)
+ {
+ printf("Error: ESSID regular expression already given. "
+@@ -6393,42 +6375,18 @@ int main(int argc, char * argv[])
+ exit(EXIT_FAILURE);
+ }
+
+- lopt.f_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
+- PCRE2_ZERO_TERMINATED,
+- 0,
+- &pcreerror,
+- &pcreerroffset,
+- NULL);
++ lopt.f_essid_regex
++ = COMPAT_PCRE_COMPILE(optarg, &pcreerror, &pcreerroffset);
+
+ if (lopt.f_essid_regex == NULL)
+ {
+- PCRE2_UCHAR pcreerrbuffer[256];
++#ifdef HAVE_PCRE2
+ pcre2_get_error_message(
+- pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
+-
+- printf("Error: regular expression compilation failed at "
+- "offset %lu: %s; aborting\n",
+- pcreerroffset,
+- pcreerrbuffer);
+- exit(EXIT_FAILURE);
+- }
++ pcreerror, pcreerrorbuf, sizeof(pcreerrorbuf));
++ COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerrorbuf);
+ #elif defined HAVE_PCRE
+- if (lopt.f_essid_regex != NULL)
+- {
+- printf("Error: ESSID regular expression already given. "
+- "Aborting\n");
+- exit(EXIT_FAILURE);
+- }
+-
+- lopt.f_essid_regex
+- = pcre_compile(optarg, 0, &pcreerror, &pcreerroffset, NULL);
+-
+- if (lopt.f_essid_regex == NULL)
+- {
+- printf("Error: regular expression compilation failed at "
+- "offset %d: %s; aborting\n",
+- pcreerroffset,
+- pcreerror);
++ COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerror);
++#endif
+ exit(EXIT_FAILURE);
+ }
+ #else
--- /dev/null
+From d7eb251f945524b419e8c90dd54c640d9922e5d5 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Sat, 21 Jan 2023 19:31:31 +0100
+Subject: [PATCH 9/9] besside-ng: utilize compat-pcre
+
+---
+ src/besside-ng/besside-ng.c | 94 ++++++++-----------------------------
+ 1 file changed, 20 insertions(+), 74 deletions(-)
+
+--- a/src/besside-ng/besside-ng.c
++++ b/src/besside-ng/besside-ng.c
+@@ -57,13 +57,7 @@
+ #include <unistd.h>
+ #include <limits.h>
+
+-#ifdef HAVE_PCRE2
+-#define PCRE2_CODE_UNIT_WIDTH 8
+-#include <pcre2.h>
+-#elif defined HAVE_PCRE
+-#include <pcre.h>
+-#endif
+-
++#include "aircrack-ng/pcre/compat-pcre.h"
+ #include "aircrack-ng/defs.h"
+ #include "aircrack-ng/aircrack-ng.h"
+ #include "aircrack-ng/version.h"
+@@ -1122,7 +1116,7 @@ static void attack_ping(void * a)
+ timer_in(100 * 1000, attack_ping, n);
+ }
+
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ static int is_filtered_essid(char * essid)
+ {
+ REQUIRE(essid != NULL);
+@@ -1131,39 +1125,20 @@ static int is_filtered_essid(char * essi
+
+ if (_conf.cf_essid_regex)
+ {
++#ifdef HAVE_PCRE2
+ _conf.cf_essid_match_data
+ = pcre2_match_data_create_from_pattern(_conf.cf_essid_regex, NULL);
+
+- return pcre2_match(_conf.cf_essid_regex,
+- (PCRE2_SPTR) essid,
+- (int) strnlen((char *) essid, MAX_IE_ELEMENT_SIZE),
+- 0,
+- 0,
+- _conf.cf_essid_match_data,
+- 0)
++ return COMPAT_PCRE_MATCH(_conf.cf_essid_regex,
++ essid,
++ MAX_IE_ELEMENT_SIZE,
++ _conf.cf_essid_match_data)
+ < 0;
+- }
+-
+- return (ret);
+-}
+ #elif defined HAVE_PCRE
+-static int is_filtered_essid(char * essid)
+-{
+- REQUIRE(essid != NULL);
+-
+- int ret = 0;
+-
+- if (_conf.cf_essid_regex)
+- {
+- return pcre_exec(_conf.cf_essid_regex,
+- NULL,
+- (char *) essid,
+- strnlen((char *) essid, MAX_IE_ELEMENT_SIZE),
+- 0,
+- 0,
+- NULL,
+- 0)
++ return COMPAT_PCRE_MATCH(
++ _conf.cf_essid_regex, essid, MAX_IE_ELEMENT_SIZE, NULL)
+ < 0;
++#endif
+ }
+
+ return (ret);
+@@ -1178,12 +1153,7 @@ static int should_attack(struct network
+ if (_conf.cf_bssid && memcmp(_conf.cf_bssid, n->n_bssid, 6) != 0)
+ return (0);
+
+-#ifdef HAVE_PCRE2
+- if (is_filtered_essid(n->n_ssid))
+- {
+- return (0);
+- }
+-#elif defined HAVE_PCRE
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ if (is_filtered_essid(n->n_ssid))
+ {
+ return (0);
+@@ -3338,6 +3308,7 @@ int main(int argc, char * argv[])
+ int ch, temp;
+ #ifdef HAVE_PCRE2
+ int pcreerror;
++ PCRE2_UCHAR pcreerrorbuf[256];
+ PCRE2_SIZE pcreerroffset;
+ #elif defined HAVE_PCRE
+ const char * pcreerror;
+@@ -3393,7 +3364,7 @@ int main(int argc, char * argv[])
+ break;
+
+ case 'R':
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ if (_conf.cf_essid_regex != NULL)
+ {
+ printf("Error: ESSID regular expression already given. "
+@@ -3401,43 +3372,18 @@ int main(int argc, char * argv[])
+ exit(EXIT_FAILURE);
+ }
+
+- _conf.cf_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
+- PCRE2_ZERO_TERMINATED,
+- 0,
+- &pcreerror,
+- &pcreerroffset,
+- NULL);
++ _conf.cf_essid_regex
++ = COMPAT_PCRE_COMPILE(optarg, &pcreerror, &pcreerroffset);
+
+ if (_conf.cf_essid_regex == NULL)
+ {
+- PCRE2_UCHAR pcreerrbuffer[256];
++#ifdef HAVE_PCRE2
+ pcre2_get_error_message(
+- pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
+-
+- printf("Error: regular expression compilation failed at "
+- "offset %lu: %s; aborting\n",
+- pcreerroffset,
+- pcreerrbuffer);
+- exit(EXIT_FAILURE);
+- }
+- break;
++ pcreerror, pcreerrorbuf, sizeof(pcreerrorbuf));
++ COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerrorbuf);
+ #elif defined HAVE_PCRE
+- if (_conf.cf_essid_regex != NULL)
+- {
+- printf("Error: ESSID regular expression already given. "
+- "Aborting\n");
+- exit(EXIT_FAILURE);
+- }
+-
+- _conf.cf_essid_regex
+- = pcre_compile(optarg, 0, &pcreerror, &pcreerroffset, NULL);
+-
+- if (_conf.cf_essid_regex == NULL)
+- {
+- printf("Error: regular expression compilation failed at "
+- "offset %d: %s; aborting\n",
+- pcreerroffset,
+- pcreerror);
++ COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerror);
++#endif
+ exit(EXIT_FAILURE);
+ }
+ break;
--- /dev/null
+From 8c6a4f171b7d97a294590fab9dc2069b149b9b36 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Mon, 23 Jan 2023 10:42:39 +0100
+Subject: [PATCH 2/6] src/makefile: add PCRE2_CFLAGS to airodump and besside
+
+---
+ src/Makefile.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/Makefile.inc
++++ b/src/Makefile.inc
+@@ -128,7 +128,7 @@ aireplay_ng_CFLAGS = $(COMMON_CFLAGS) $(
+ aireplay_ng_LDADD = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+
+ airodump_ng_SOURCES = $(SRC_ADU) $(SRC_DWRITE)
+-airodump_ng_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
++airodump_ng_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS) $(LIBNL_CFLAGS)
+ airodump_ng_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_srcdir)/src/airodump-ng
+ airodump_ng_LDADD = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_CE_WEP_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+
+@@ -163,7 +163,7 @@ buddy_ng_CPPFLAGS = $(AM_CPPFLAGS) -I$(a
+ buddy_ng_LDADD = $(COMMON_LDADD) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+
+ besside_ng_SOURCES = $(SRC_BS)
+-besside_ng_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
++besside_ng_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS) $(LIBNL_CFLAGS)
+ besside_ng_LDADD = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBPTW_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+
+ besside_ng_crawler_SOURCES = $(SRC_BC)
--- /dev/null
+From 0be8f0d7d8e4a09ea5687bcec6690876b4161a0e Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Mon, 23 Jan 2023 10:46:26 +0100
+Subject: [PATCH 3/6] lib/makefile: add PCRE2 to libaccrypto and libaircrack
+
+---
+ lib/Makefile.inc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/lib/Makefile.inc
++++ b/lib/Makefile.inc
+@@ -65,8 +65,8 @@ SRC_CRYPTO += %D%/crypto/sha1-git.c
+ endif
+
+ libaccrypto_la_SOURCES = $(SRC_CRYPTO)
+-libaccrypto_la_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS)
+-libaccrypto_la_LIBADD = $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
++libaccrypto_la_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS)
++libaccrypto_la_LIBADD = $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
+
+ libcowpatty_la_SOURCES = $(SRC_COW)
+ libcowpatty_la_CFLAGS = $(COMMON_CFLAGS) $(LIBCOW_CFLAGS)
+@@ -121,12 +121,12 @@ SRC_LIBAC += %D%/libac/support/strlcpy.c
+ endif
+
+ libaircrack_la_SOURCES = $(SRC_LIBAC) $(TRAMPOLINE) $(CPUSET)
+-libaircrack_la_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) \
++libaircrack_la_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS) \
+ "-DLIBAIRCRACK_CE_WPA_PATH=\"$(LIBAIRCRACK_CE_WPA_PATH)\"" \
+ "-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \
+ "-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \
+ "-DLIBDIR=\"$(libdir)\""
+-libaircrack_la_LIBADD = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(PCRE_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
++libaircrack_la_LIBADD = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(PCRE_LIBS) $(PCRE2_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
+
+ if CYGWIN
+ libaircrack_la_LIBADD += -lshlwapi
--- /dev/null
+From b381ef3f6b6cc83a4aa016f4c0aebb58fcffcf3f Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Mon, 23 Jan 2023 16:58:38 +0100
+Subject: [PATCH] autotools: indicate if PCRE or PCRE2 is being used
+
+---
+ build/m4/aircrack_ng_pcre.m4 | 28 ++++++++++++++--
+ build/m4/aircrack_ng_pcre2.m4 | 61 -----------------------------------
+ configure.ac | 3 +-
+ 3 files changed, 26 insertions(+), 66 deletions(-)
+ delete mode 100644 build/m4/aircrack_ng_pcre2.m4
+
+--- a/build/m4/aircrack_ng_pcre.m4
++++ b/build/m4/aircrack_ng_pcre.m4
+@@ -55,7 +55,29 @@ else
+ PKG_CHECK_MODULES(PCRE, libpcre, HAVE_PCRE=yes, HAVE_PCRE=no)
+ fi
+
+-AS_IF([test "x$HAVE_PCRE" = "xyes"], [
++AC_ARG_ENABLE(static-pcre2,
++ AS_HELP_STRING([--enable-static-pcre2],
++ [Enable statically linked PCRE2 libpcre2-8.]),
++ [static_pcre2=$enableval], [static_pcre2=no])
++
++if test "x$static_pcre2" != "xno"; then
++ AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT])
++ AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version)
++ if test "x$PCRE2_FOUND" = xyes; then
++ HAVE_PCRE2=yes
++ else
++ HAVE_PCRE2=no
++ fi
++else
++ PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no)
++fi
++
++if test "x$HAVE_PCRE" = "xyes" && test "x$HAVE_PCRE2" = "xyes"; then
++ AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
++ PCRE2_NOTE="(Pcre and Pcre2 found, using Pcre2)"
++elif test "x$HAVE_PCRE" = "xyes"; then
+ AC_DEFINE([HAVE_PCRE], [1], [Define this if you have libpcre on your system])
+-])
+-])
++elif test "x$HAVE_PCRE2" = "xyes"; then
++ AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
++fi
++])
+\ No newline at end of file
+--- a/build/m4/aircrack_ng_pcre2.m4
++++ /dev/null
+@@ -1,61 +0,0 @@
+-dnl Aircrack-ng
+-dnl
+-dnl Copyright (C) 2023 Andras Gemes <andrasgemes@outlook.com>
+-dnl
+-dnl Autotool support was written by: Joseph Benden <joe@benden.us>
+-dnl
+-dnl This program is free software; you can redistribute it and/or modify
+-dnl it under the terms of the GNU General Public License as published by
+-dnl the Free Software Foundation; either version 2 of the License, or
+-dnl (at your option) any later version.
+-dnl
+-dnl This program is distributed in the hope that it will be useful,
+-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-dnl GNU General Public License for more details.
+-dnl
+-dnl You should have received a copy of the GNU General Public License
+-dnl along with this program; if not, write to the Free Software
+-dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+-dnl
+-dnl In addition, as a special exception, the copyright holders give
+-dnl permission to link the code of portions of this program with the
+-dnl OpenSSL library under certain conditions as described in each
+-dnl individual source file, and distribute linked combinations
+-dnl including the two.
+-dnl
+-dnl You must obey the GNU General Public License in all respects
+-dnl for all of the code used other than OpenSSL.
+-dnl
+-dnl If you modify file(s) with this exception, you may extend this
+-dnl exception to your dnl version of the file(s), but you are not obligated
+-dnl to do so.
+-dnl
+-dnl If you dnl do not wish to do so, delete this exception statement from your
+-dnl version.
+-dnl
+-dnl If you delete this exception statement from all source files in the
+-dnl program, then also delete it here.
+-
+-AC_DEFUN([AIRCRACK_NG_PCRE2], [
+-AC_ARG_ENABLE(static-pcre2,
+- AS_HELP_STRING([--enable-static-pcre2],
+- [Enable statically linked PCRE2 libpcre2-8.]),
+- [static_pcre2=$enableval], [static_pcre2=no])
+-
+-if test "x$static_pcre2" != "xno"; then
+- AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT])
+- AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version)
+- if test "x$PCRE2_FOUND" = xyes; then
+- HAVE_PCRE2=yes
+- else
+- HAVE_PCRE2=no
+- fi
+-else
+- PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no)
+-fi
+-
+-AS_IF([test "x$HAVE_PCRE2" = "xyes"], [
+- AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
+-])
+-])
+\ No newline at end of file
+--- a/configure.ac
++++ b/configure.ac
+@@ -144,7 +144,6 @@ AIRCRACK_NG_EXT_SCRIPTS
+ AIRCRACK_NG_HWLOC
+ AIRCRACK_NG_PCAP
+ AIRCRACK_NG_PCRE
+-AIRCRACK_NG_PCRE2
+ AIRCRACK_NG_RFKILL
+ AIRCRACK_NG_SQLITE
+ AIRCRACK_NG_ZLIB
+@@ -321,7 +320,7 @@ ${PACKAGE} ${VERSION}
+ Jemalloc: ${JEMALLOC}
+ Pcap: ${PCAP_FOUND}
+ Pcre: ${HAVE_PCRE}
+- Pcre2: ${HAVE_PCRE2}
++ Pcre2: ${HAVE_PCRE2} ${PCRE2_NOTE}
+ Sqlite: ${HAVE_SQLITE3}
+ Tcmalloc: ${TCMALLOC}
+ Zlib: ${HAVE_ZLIB}
--- /dev/null
+From b8d0b8cb6caa6940443b3e6ca32efc78d0c9d00e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth@gmail.com>
+Date: Sun, 1 Oct 2023 00:32:16 +0200
+Subject: [PATCH] autotools: reset PCRE CFLAGS/LIBS with both PCRE and PCRE2
+ present
+
+Commit b381ef3f6b6c ("autotools: indicate if PCRE or PCRE2 is being
+used") fixed a case where both pcre and pcre2 library are detected and
+put a preference on using pcre2.
+
+Although the commit fix this corner case, there is still a latent
+problem with trying to link/include both library. This is caused by the
+fact that in the Makefile.inc for src and lib, we include both
+PCRE_CFLAGS and PCRE2_CFLAGS and PCRE_LIBS and PCRE2_LIBS for each
+tool/lib.
+
+To handle this and not bloat the Makefile with additional condition,
+simply reset the PCRE_CFLAGS and PCRE_LIBS in case where we detect both
+library and we prefer to use pcre2.
+
+Fixes: b381ef3f6b6c ("autotools: indicate if PCRE or PCRE2 is being used")
+Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+---
+ build/m4/aircrack_ng_pcre.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/build/m4/aircrack_ng_pcre.m4
++++ b/build/m4/aircrack_ng_pcre.m4
+@@ -75,6 +75,10 @@ fi
+ if test "x$HAVE_PCRE" = "xyes" && test "x$HAVE_PCRE2" = "xyes"; then
+ AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
+ PCRE2_NOTE="(Pcre and Pcre2 found, using Pcre2)"
++ # Reset PCRE cflags and libs variables as we include both PCRE and PCRE2 in Makefile.inc
++ # and would result in trying to link/include both library.
++ PCRE_CFLAGS=""
++ PCRE_LIBS=""
+ elif test "x$HAVE_PCRE" = "xyes"; then
+ AC_DEFINE([HAVE_PCRE], [1], [Define this if you have libpcre on your system])
+ elif test "x$HAVE_PCRE2" = "xyes"; then
include $(TOPDIR)/rules.mk
PKG_NAME:=atftp
-PKG_VERSION:=0.7.5
+PKG_VERSION:=0.8.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=93c87a4fb18218414e008e01c995dadd231ba4c752d0f894b34416d1e6d3038a
+PKG_HASH:=df2aa089c7670f9eab40e5598e5d2cb6a582dc5182926ea50b4d690e4e37f316
PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
include $(INCLUDE_DIR)/package.mk
define Package/atftp/Default
define Package/atftpd
$(call Package/atftp/Default)
- DEPENDS:=+libpcre +libpthread
+ DEPENDS:=+libpcre2 +libpthread
TITLE+= server
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=banip
-PKG_VERSION:=0.9.0
+PKG_VERSION:=0.9.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
| ban_dev | list | - / autodetect | wan device(s), e.g. 'eth2' |
| ban_vlanallow | list | - | always allow certain VLAN forwards, e.g. br-lan.20 |
| ban_vlanblock | list | - | always block certain VLAN forwards, e.g. br-lan.10 |
-| ban_trigger | list | - | logical startup trigger interface(s), e.g. 'wan' |
-| ban_triggerdelay | option | 10 | trigger timeout before banIP processing begins |
-| ban_triggeraction | option | start | trigger action on ifup events, e.g. start, restart or reload |
+| ban_trigger | list | - | logical reload trigger interface(s), e.g. 'wan' |
+| ban_triggerdelay | option | 10 | trigger timeout during interface reload and boot |
| ban_deduplicate | option | 1 | deduplicate IP addresses across all active Sets |
| ban_splitsize | option | 0 | split ext. Sets after every n lines/members (saves RAM) |
| ban_cores | option | - / autodetect | limit the cpu cores used by banIP (saves RAM) |
| ban_asn | list | - | ASNs for the 'asn' feed, e.g.'32934' |
| ban_country | list | - | country iso codes for the 'country' feed, e.g. 'ru' |
| ban_blockpolicy | option | - | limit the default block policy to a certain chain, e.g. 'input', 'forwardwan' or 'forwardlan' |
+| ban_blocktype | option | drop | 'drop' packets silently on input and forwardwan chains or actively 'reject' the traffic |
| ban_blockinput | list | - | limit a feed to the wan-input chain, e.g. 'country' |
| ban_blockforwardwan | list | - | limit a feed to the wan-forward chain, e.g. 'debl' |
| ban_blockforwardlan | list | - | limit a feed to the lan-forward chain, e.g. 'doh' |
ban_autodetect="1"
ban_feed=""
ban_blockpolicy=""
+ban_blocktype="drop"
ban_blockinput=""
ban_blockforwardwan=""
ban_blockforwardlan=""
ban_memory=""
ban_packages=""
ban_trigger=""
-ban_triggerdelay="10"
ban_resolver=""
ban_enabled="0"
ban_debug="0"
}
}
config_load banip
-
- [ "${ban_action}" = "boot" ] && [ -z "${ban_trigger}" ] && sleep ${ban_triggerdelay}
}
# get nft/monitor actuals
network_flush_cache
for iface in ${ban_ifv4} ${ban_ifv6}; do
network_get_device dev "${iface}"
- if [ -n "${dev}" ]; then
- if printf "%s" "${dev}" | "${ban_grepcmd}" -qE "pppoe|6in4"; then
- dev="${iface}"
- fi
- if ! printf " %s " "${ban_dev}" | "${ban_grepcmd}" -q " ${dev} "; then
- ban_dev="${ban_dev}${dev} "
- uci_add_list banip global ban_dev "${dev}"
- f_log "info" "add device '${dev}' to config"
- fi
+ if [ -n "${dev}" ] && ! printf " %s " "${ban_dev}" | "${ban_grepcmd}" -q " ${dev} "; then
+ ban_dev="${ban_dev}${dev} "
+ uci_add_list banip global ban_dev "${dev}"
+ f_log "info" "add device '${dev}' to config"
fi
done
cnt="$((cnt + 1))"
f_getfeed() {
json_init
if [ -s "${ban_customfeedfile}" ]; then
- if ! json_load_file "${ban_customfeedfile}" >/dev/null 2>&1; then
+ if json_load_file "${ban_customfeedfile}" >/dev/null 2>&1; then
+ return
+ else
f_log "info" "can't load banIP custom feed file"
- if ! json_load_file "${ban_feedfile}" >/dev/null 2>&1; then
- f_log "err" "can't load banIP feed file"
- fi
fi
- elif ! json_load_file "${ban_feedfile}" >/dev/null 2>&1; then
+ fi
+ if [ -s "${ban_feedfile}" ] && json_load_file "${ban_feedfile}" >/dev/null 2>&1; then
+ return
+ else
f_log "err" "can't load banIP feed file"
fi
}
etag_id="$(printf "%s" "${http_head}" | "${ban_awkcmd}" 'tolower($0)~/^[[:space:]]*etag: /{gsub("\"","");printf "%s",$2}')"
etag_rc="${?}"
- if [ "${http_code}" = "404" ] || { [ "${etag_rc}" = "0" ] && [ -n "${etag_id}" ] && "${ban_grepcmd}" -q "^${feed}${feed_suffix}.*${etag_id}\$" "${ban_backupdir}/banIP.etag"; }; then
+ if [ "${http_code}" = "404" ] || { [ "${etag_rc}" = "0" ] && [ -n "${etag_id}" ] && "${ban_grepcmd}" -q "^${feed}${feed_suffix}[[:space:]]\+${etag_id}\$" "${ban_backupdir}/banIP.etag"; }; then
out_rc="0"
- elif [ "${etag_rc}" = "0" ] && [ -n "${etag_id}" ] && ! "${ban_grepcmd}" -q "^${feed}${feed_suffix}.*${etag_id}\$" "${ban_backupdir}/banIP.etag"; then
+ elif [ "${etag_rc}" = "0" ] && [ -n "${etag_id}" ] && ! "${ban_grepcmd}" -q "^${feed}${feed_suffix}[[:space:]]\+${etag_id}\$" "${ban_backupdir}/banIP.etag"; then
"${ban_sedcmd}" -i "/^${feed}${feed_suffix}/d" "${ban_backupdir}/banIP.etag"
printf "%-20s%s\n" "${feed}${feed_suffix}" "${etag_id}" >>"${ban_backupdir}/banIP.etag"
out_rc="2"
printf "%s\n" "add chain inet banIP wan-input { type filter hook input priority ${ban_nftpriority}; policy accept; }"
printf "%s\n" "add chain inet banIP wan-forward { type filter hook forward priority ${ban_nftpriority}; policy accept; }"
printf "%s\n" "add chain inet banIP lan-forward { type filter hook forward priority ${ban_nftpriority}; policy accept; }"
+ printf "%s\n" "add chain inet banIP reject-chain"
+
+ # default reject rules
+ #
+ printf "%s\n" "add rule inet banIP reject-chain meta l4proto tcp reject with tcp reset"
+ printf "%s\n" "add rule inet banIP reject-chain reject"
# default wan-input rules
#
printf "%s\n" "add rule inet banIP lan-forward ct state established,related counter accept"
printf "%s\n" "add rule inet banIP lan-forward oifname != { ${wan_dev} } counter accept"
[ -n "${vlan_allow}" ] && printf "%s\n" "add rule inet banIP lan-forward iifname { ${vlan_allow} } counter accept"
- [ -n "${vlan_block}" ] && printf "%s\n" "add rule inet banIP lan-forward iifname { ${vlan_block} } counter reject"
+ [ -n "${vlan_block}" ] && printf "%s\n" "add rule inet banIP lan-forward iifname { ${vlan_block} } counter goto reject-chain"
} >"${file}"
# load initial banIP table within nft (atomic load)
tmp_nft="${ban_tmpfile}.${feed}.nft"
tmp_allow="${ban_tmpfile}.${feed%v*}"
- [ "${ban_loginput}" = "1" ] && log_input="log level ${ban_nftloglevel} prefix \"banIP/inp-wan/drp/${feed}: \""
- [ "${ban_logforwardwan}" = "1" ] && log_forwardwan="log level ${ban_nftloglevel} prefix \"banIP/fwd-wan/drp/${feed}: \""
- [ "${ban_logforwardlan}" = "1" ] && log_forwardlan="log level ${ban_nftloglevel} prefix \"banIP/fwd-lan/rej/${feed}: \""
+ [ "${ban_loginput}" = "1" ] && log_input="log level ${ban_nftloglevel} prefix \"banIP/inp-wan/${ban_blocktype}/${feed}: \""
+ [ "${ban_logforwardwan}" = "1" ] && log_forwardwan="log level ${ban_nftloglevel} prefix \"banIP/fwd-wan/${ban_blocktype}/${feed}: \""
+ [ "${ban_logforwardlan}" = "1" ] && log_forwardlan="log level ${ban_nftloglevel} prefix \"banIP/fwd-lan/reject/${feed}: \""
# set feed block direction
#
printf "%s\n" "add set inet banIP ${feed} { type ipv4_addr; flags interval; auto-merge; policy ${ban_nftpolicy}; $(f_getelements "${tmp_file}") }"
if [ -z "${feed_direction##*input*}" ]; then
if [ "${ban_allowlistonly}" = "1" ]; then
- printf "%s\n" "add rule inet banIP wan-input ip saddr != @${feed} ${log_input} counter drop"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ printf "%s\n" "add rule inet banIP wan-input ip saddr != @${feed} ${log_input} counter goto reject-chain"
+ else
+ printf "%s\n" "add rule inet banIP wan-input ip saddr != @${feed} ${log_input} counter drop"
+ fi
else
printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} counter accept"
fi
fi
if [ -z "${feed_direction##*forwardwan*}" ]; then
if [ "${ban_allowlistonly}" = "1" ]; then
- printf "%s\n" "add rule inet banIP wan-forward ip saddr != @${feed} ${log_forwardwan} counter drop"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ printf "%s\n" "add rule inet banIP wan-forward ip saddr != @${feed} ${log_forwardwan} counter goto reject-chain"
+ else
+ printf "%s\n" "add rule inet banIP wan-forward ip saddr != @${feed} ${log_forwardwan} counter drop"
+ fi
else
printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} counter accept"
fi
fi
if [ -z "${feed_direction##*forwardlan*}" ]; then
if [ "${ban_allowlistonly}" = "1" ]; then
- printf "%s\n" "add rule inet banIP lan-forward ip daddr != @${feed} ${log_forwardlan} counter reject with icmp type admin-prohibited"
+ printf "%s\n" "add rule inet banIP lan-forward ip daddr != @${feed} ${log_forwardlan} counter goto reject-chain"
else
printf "%s\n" "add rule inet banIP lan-forward ip daddr @${feed} counter accept"
fi
printf "%s\n" "add set inet banIP ${feed} { type ipv6_addr; flags interval; auto-merge; policy ${ban_nftpolicy}; $(f_getelements "${tmp_file}") }"
if [ -z "${feed_direction##*input*}" ]; then
if [ "${ban_allowlistonly}" = "1" ]; then
- printf "%s\n" "add rule inet banIP wan-input ip6 saddr != @${feed} ${log_input} counter drop"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ printf "%s\n" "add rule inet banIP wan-input ip6 saddr != @${feed} ${log_input} counter goto reject-chain"
+ else
+ printf "%s\n" "add rule inet banIP wan-input ip6 saddr != @${feed} ${log_input} counter drop"
+ fi
else
printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} counter accept"
fi
fi
if [ -z "${feed_direction##*forwardwan*}" ]; then
if [ "${ban_allowlistonly}" = "1" ]; then
- printf "%s\n" "add rule inet banIP wan-forward ip6 saddr != @${feed} ${log_forwardwan} counter drop"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ printf "%s\n" "add rule inet banIP wan-forward ip6 saddr != @${feed} ${log_forwardwan} counter goto reject-chain"
+ else
+ printf "%s\n" "add rule inet banIP wan-forward ip6 saddr != @${feed} ${log_forwardwan} counter drop"
+ fi
else
printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} counter accept"
fi
fi
if [ -z "${feed_direction##*forwardlan*}" ]; then
if [ "${ban_allowlistonly}" = "1" ]; then
- printf "%s\n" "add rule inet banIP lan-forward ip6 daddr != @${feed} ${log_forwardlan} counter reject with icmpv6 type admin-prohibited"
+ printf "%s\n" "add rule inet banIP lan-forward ip6 daddr != @${feed} ${log_forwardlan} counter goto reject-chain"
else
printf "%s\n" "add rule inet banIP lan-forward ip6 daddr @${feed} counter accept"
fi
if [ "${proto}" = "4MAC" ]; then
"${ban_awkcmd}" '/^([0-9A-f]{2}:){5}[0-9A-f]{2}(\/([0-9]|[1-3][0-9]|4[0-8]))?([[:space:]]+([0-9]{1,3}\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(\/(1?[0-9]|2?[0-9]|3?[0-2]))?[[:space:]]*$|[[:space:]]+$|$)/{if(!$2)$2="0.0.0.0/0";if(!seen[$1]++)printf "%s . %s, ",tolower($1),$2}' "${ban_blocklist}" >"${tmp_file}"
printf "%s\n" "add set inet banIP ${feed} { type ether_addr . ipv4_addr; flags interval; auto-merge; policy ${ban_nftpolicy}; $(f_getelements "${tmp_file}") }"
- [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ether saddr . ip saddr @${feed} counter reject"
+ [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ether saddr . ip saddr @${feed} counter goto reject-chain"
elif [ "${proto}" = "6MAC" ]; then
"${ban_awkcmd}" '/^([0-9A-f]{2}:){5}[0-9A-f]{2}(\/([0-9]|[1-3][0-9]|4[0-8]))?([[:space:]]+([0-9A-f]{0,4}:){1,7}[0-9A-f]{0,4}:?(\/(1?[0-2][0-8]|[0-9][0-9]))?[[:space:]]*$|[[:space:]]+$|$)/{if(!$2)$2="::/0";if(!seen[$1]++)printf "%s . %s, ",tolower($1),$2}' "${ban_blocklist}" >"${tmp_file}"
printf "%s\n" "add set inet banIP ${feed} { type ether_addr . ipv6_addr; flags interval; auto-merge; policy ${ban_nftpolicy}; $(f_getelements "${tmp_file}") }"
- [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ether saddr . ip6 saddr @${feed} counter reject"
+ [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ether saddr . ip6 saddr @${feed} counter goto reject-chain"
elif [ "${proto}" = "4" ]; then
if [ "${ban_deduplicate}" = "1" ]; then
"${ban_awkcmd}" '/^(([0-9]{1,3}\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(\/(1?[0-9]|2?[0-9]|3?[0-2]))?)([[:space:]].*|$)/{printf "%s,\n",$1}' "${ban_blocklist}" >"${tmp_raw}"
fi
"${ban_awkcmd}" '{ORS=" ";print}' "${tmp_split}" 2>/dev/null >"${tmp_file}"
printf "%s\n" "add set inet banIP ${feed} { type ipv4_addr; flags interval, timeout; auto-merge; policy ${ban_nftpolicy}; $(f_getelements "${tmp_file}") }"
- [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} ${log_input} counter drop"
- [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} ${log_forwardwan} counter drop"
- [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip daddr @${feed} ${log_forwardlan} counter reject with icmp type admin-prohibited"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} ${log_input} counter goto reject-chain"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} ${log_forwardwan} counter goto reject-chain"
+ else
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} ${log_input} counter drop"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} ${log_forwardwan} counter drop"
+ fi
+ [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip daddr @${feed} ${log_forwardlan} counter goto reject-chain"
elif [ "${proto}" = "6" ]; then
if [ "${ban_deduplicate}" = "1" ]; then
"${ban_awkcmd}" '!/^([0-9A-f]{2}:){5}[0-9A-f]{2}.*/{printf "%s\n",$1}' "${ban_blocklist}" |
fi
"${ban_awkcmd}" '{ORS=" ";print}' "${tmp_split}" 2>/dev/null >"${tmp_file}"
printf "%s\n" "add set inet banIP ${feed} { type ipv6_addr; flags interval, timeout; auto-merge; policy ${ban_nftpolicy}; $(f_getelements "${tmp_file}") }"
- [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} ${log_input} counter drop"
- [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} ${log_forwardwan} counter drop"
- [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip6 daddr @${feed} ${log_forwardlan} counter reject with icmpv6 type admin-prohibited"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} ${log_input} counter goto reject-chain"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} ${log_forwardwan} counter goto reject-chain"
+ else
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} ${log_input} counter drop"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} ${log_forwardwan} counter drop"
+ fi
+ [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip6 daddr @${feed} ${log_forwardlan} counter goto reject-chain"
fi
} >"${tmp_nft}"
feed_rc="0"
# input and forward rules
#
- [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} ${log_input} counter drop"
- [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} ${log_forwardwan} counter drop"
- [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip daddr @${feed} ${log_forwardlan} counter reject with icmp type admin-prohibited"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} ${log_input} counter goto reject-chain"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} ${log_forwardwan} counter goto reject-chain"
+ else
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip saddr @${feed} ${log_input} counter drop"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip saddr @${feed} ${log_forwardwan} counter drop"
+ fi
+ [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip daddr @${feed} ${log_forwardlan} counter goto reject-chain"
} >"${tmp_nft}"
elif [ "${feed_rc}" = "0" ] && [ "${proto}" = "6" ]; then
{
# input and forward rules
#
- [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} ${log_input} counter drop"
- [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} ${log_forwardwan} counter drop"
- [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip6 daddr @${feed} ${log_forwardlan} counter reject with icmpv6 type admin-prohibited"
+ if [ "${ban_blocktype}" = "reject" ]; then
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} ${log_input} counter goto reject-chain"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} ${log_forwardwan} counter goto reject-chain"
+ else
+ [ -z "${feed_direction##*input*}" ] && printf "%s\n" "add rule inet banIP wan-input ip6 saddr @${feed} ${log_input} counter drop"
+ [ -z "${feed_direction##*forwardwan*}" ] && printf "%s\n" "add rule inet banIP wan-forward ip6 saddr @${feed} ${log_forwardwan} counter drop"
+ fi
+ [ -z "${feed_direction##*forwardlan*}" ] && printf "%s\n" "add rule inet banIP lan-forward ip6 daddr @${feed} ${log_forwardlan} counter goto reject-chain"
} >"${tmp_nft}"
fi
fi
# generate status information
#
f_genstatus() {
- local object duration item table_sets cnt_elements="0" custom_feed="0" split="0" status="${1}"
+ local object end_time duration table_sets cnt_elements="0" custom_feed="0" split="0" status="${1}"
[ -z "${ban_dev}" ] && f_conf
if [ "${status}" = "active" ]; then
- if [ -n "${ban_starttime}" ]; then
- ban_endtime="$(date "+%s")"
- duration="$(((ban_endtime - ban_starttime) / 60))m $(((ban_endtime - ban_starttime) % 60))s"
+ if [ -n "${ban_starttime}" ] && [ "${ban_action}" != "boot" ]; then
+ end_time="$(date "+%s")"
+ duration="$(((end_time - ban_starttime) / 60))m $(((end_time - ban_starttime) % 60))s"
fi
table_sets="$("${ban_nftcmd}" -tj list ruleset 2>/dev/null | "${ban_jsoncmd}" -qe '@.nftables[@.set.table="banIP"].set.name')"
if [ "${ban_reportelements}" = "1" ]; then
- for item in ${table_sets}; do
- cnt_elements="$((cnt_elements + $("${ban_nftcmd}" -j list set inet banIP "${item}" 2>/dev/null | "${ban_jsoncmd}" -qe '@.nftables[*].set.elem[*]' | wc -l 2>/dev/null)))"
+ for object in ${table_sets}; do
+ cnt_elements="$((cnt_elements + $("${ban_nftcmd}" -j list set inet banIP "${object}" 2>/dev/null | "${ban_jsoncmd}" -qe '@.nftables[*].set.elem[*]' | wc -l 2>/dev/null)))"
done
fi
runtime="action: ${ban_action:-"-"}, fetch: ${ban_fetchcmd##*/}, duration: ${duration:-"-"}, date: $(date "+%Y-%m-%d %H:%M:%S")"
local nft_expiry line proto ip log_raw log_count rdap_log rdap_rc rdap_elements rdap_info
if [ -x "${ban_logreadcmd}" ] && [ -n "${ban_logterm%%??}" ] && [ "${ban_loglimit}" != "0" ]; then
-
f_log "info" "start detached banIP log service"
[ -n "${ban_nftexpiry}" ] && nft_expiry="timeout $(printf "%s" "${ban_nftexpiry}" | "${ban_grepcmd}" -oE "([0-9]+[d|h|m|s])+$")"
-
"${ban_logreadcmd}" -fe "${ban_logterm%%??}" 2>/dev/null |
while read -r line; do
- : >"{ban_rdapfile}"
+ : >"${ban_rdapfile}"
proto=""
ip="$(printf "%s" "${line}" | "${ban_awkcmd}" 'BEGIN{RS="(([0-9]{1,3}\\.){3}[0-9]{1,3})+"}{if(!seen[RT]++)printf "%s ",RT}')"
ip="$(f_trim "${ip}")"
ip="${ip##* }"
[ -n "${ip}" ] && proto="v6"
fi
- if [ -n "${proto}" ] && ! "${ban_nftcmd}" get element inet banIP blocklist"${proto}" "{ ${ip} }" >/dev/null 2>&1; then
+ if [ -n "${proto}" ] && ! "${ban_nftcmd}" get element inet banIP blocklist"${proto}" "{ ${ip} }" >/dev/null 2>&1 && ! "${ban_grepcmd}" -q "^${ip}" "${ban_allowlist}"; then
f_log "info" "suspicious IP '${ip}'"
log_raw="$("${ban_logreadcmd}" -l "${ban_loglimit}" 2>/dev/null)"
log_count="$(printf "%s\n" "${log_raw}" | "${ban_grepcmd}" -c "suspicious IP '${ip}'")"
# load config and set banIP environment
#
+[ "${ban_action}" = "boot" ] && sleep "$(uci_get banip global ban_triggerdelay "10")"
f_conf
f_log "info" "start banIP processing (${ban_action})"
f_log "debug" "f_system ::: system: ${ban_sysver:-"n/a"}, version: ${ban_ver:-"n/a"}, memory: ${ban_memory:-"0"}, cpu_cores: ${ban_cores}"
# handle downloads
#
f_log "info" "start banIP download processes"
-[ "${ban_allowlistonly}" = "1" ] && ban_feed="" || f_getfeed
+if [ "${ban_allowlistonly}" = "1" ]; then
+ ban_feed=""
+else
+ f_getfeed
+fi
[ "${ban_deduplicate}" = "1" ] && printf "\n" >"${ban_tmpfile}.deduplicate"
cnt="1"
#
if [ "${ban_mailnotification}" = "1" ] && [ -n "${ban_mailreceiver}" ] && [ -x "${ban_mailcmd}" ]; then
(
- sleep ${ban_triggerdelay}
+ sleep 5
f_mail
) &
fi
# (s)hellcheck exceptions
# shellcheck disable=all
-START=30
+START=95
USE_PROCD=1
extra_command "report" "[text|json|mail] Print banIP related Set statistics"
[ "${action}" = "boot" ] && "${ban_init}" running && exit 0
{ [ "${action}" = "stop" ] || [ "${action}" = "report" ] || [ "${action}" = "search" ] || [ "${action}" = "survey" ] || [ "${action}" = "lookup" ]; } && ! "${ban_init}" running && exit 0
-[ -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "lookup" ]; } && exit 1
-[ ! -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "lookup" ]; } && mkdir -p "${ban_lock}"
+[ -d "${ban_lock}" ] && { [ "${action}" = "boot" ] || [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "lookup" ]; } && exit 1
+[ ! -d "${ban_lock}" ] && { [ "${action}" = "boot" ] || [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "lookup" ]; } && mkdir -p "${ban_lock}"
boot() {
: >"${ban_pidfile}"
start_service() {
if "${ban_init}" enabled; then
- [ "${action}" = "boot" ] && [ -n "$(uci_get banip global ban_trigger)" ] && return 0
[ -z "$(command -v "f_system")" ] && . "${ban_funlib}"
f_rmpid
procd_open_instance "banip-service"
}
service_triggers() {
- local iface trigger trigger_action delay
+ local iface trigger delay
- trigger="$(uci_get banip global ban_trigger)"
- trigger_action="$(uci_get banip global ban_triggeraction "start")"
delay="$(uci_get banip global ban_triggerdelay "10")"
- PROCD_RELOAD_DELAY=$((delay * 1000))
+ trigger="$(uci_get banip global ban_trigger)"
+ PROCD_RELOAD_DELAY="$((delay * 1000))"
for iface in ${trigger}; do
- procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" "${trigger_action}"
+ procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" reload
done
+
+ PROCD_RELOAD_DELAY="$((2 * 1000))"
procd_add_reload_trigger "banip"
}
#
local banip_info report_info log_info system_info mail_text
-banip_info="$(/etc/init.d/banip status 2>/dev/null | awk '{NR=1;max=140;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{print substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
+banip_info="$(/etc/init.d/banip status 2>/dev/null | awk '{NR=1;max=160;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{print substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
report_info="$(cat ${ban_reportdir}/ban_report.txt 2>/dev/null)"
-log_info="$("${ban_logreadcmd}" -l 100 -e "banIP/" 2>/dev/null | awk '{NR=1;max=140;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{print substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
+log_info="$("${ban_logreadcmd}" -l 100 -e "banIP/" 2>/dev/null | awk '{NR=1;max=160;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{print substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
system_info="$(
strings /etc/banner 2>/dev/null
ubus call system board | awk 'BEGIN{FS="[{}\"]"}{if($2=="kernel"||$2=="hostname"||$2=="system"||$2=="model"||$2=="description")printf " + %-12s: %s\n",$2,$4}'
include $(TOPDIR)/rules.mk
PKG_NAME:=irssi
-PKG_VERSION:=1.4.4
+PKG_VERSION:=1.4.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/$(PKG_VERSION)/
-PKG_HASH:=fefe9ec8c7b1475449945c934a2360ab12693454892be47a6d288c63eb107ead
+PKG_HASH:=72a951cb0ad622785a8962801f005a3a412736c7e7e3ce152f176287c52fe062
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=wget
-PKG_VERSION:=1.21.3
-PKG_RELEASE:=3
+PKG_VERSION:=1.21.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=5726bb8bc5ca0f6dc7110f6416e4bb7019e2d2ff5bf93d1ca2ffcc6656f220e5
+PKG_HASH:=81542f5cefb8faacc39bbbc6c82ded80e3e4a88505ae72ea51df27525bcde04c
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:gnu:wget
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+++ /dev/null
-From 485217d0ff8d0d17ea3815244b2bc2b747451e15 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
-Date: Sat, 10 Dec 2022 16:43:38 +0100
-Subject: [PATCH] * configure.ac: Allow disabling NTLM if nettle present (Savannah #63431)
-
----
- configure.ac | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -648,8 +648,11 @@ else
-
- if test x"$HAVE_NETTLE" = xyes; then
- AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
-- ENABLE_NTLM=yes
-- AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
-+ if test x"$ENABLE_NTLM" != xno
-+ then
-+ ENABLE_NTLM=yes
-+ AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
-+ fi
- fi
- fi
-
+++ /dev/null
-From c69030a904f8ab25b9ca2704c8a6dd03554e9503 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
-Date: Sun, 11 Dec 2022 13:31:38 +0100
-Subject: [PATCH] * configure.ac: Disable nettle if NTLM is explicitly disabled
-
----
- configure.ac | 41 +++++++++++++++++++----------------------
- 1 file changed, 19 insertions(+), 22 deletions(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -622,34 +622,31 @@ AS_IF([test x"$with_ssl" = xopenssl], [
- ]) # endif: --with-ssl == openssl?
-
- dnl Enable NTLM if requested and if SSL is available.
--if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
-+if test x"$ENABLE_NTLM" != xno
- then
-- if test x"$ENABLE_NTLM" != xno
-+ if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
- then
- ENABLE_NTLM=yes
- AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
-- fi
--else
-- PKG_CHECK_MODULES([NETTLE], nettle, [
-- HAVE_NETTLE=yes
-- LIBS="$NETTLE_LIBS $LIBS"
-- CFLAGS="$NETTLE_CFLAGS $CFLAGS"
-- ], [
-- AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)])
-- if test x"$HAVE_NETTLE" != xyes; then
-- if test x"$ENABLE_NTLM" = xyes; then
-- AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting])
-- fi
-- else
-- AC_SUBST(NETTLE_LIBS, "-lnettle")
-+ else
-+ PKG_CHECK_MODULES([NETTLE], nettle, [
-+ HAVE_NETTLE=yes
- LIBS="$NETTLE_LIBS $LIBS"
-- fi
-- ])
-+ CFLAGS="$NETTLE_CFLAGS $CFLAGS"
-+ ], [
-+ AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)])
-+ if test x"$HAVE_NETTLE" != xyes; then
-+ if test x"$ENABLE_NTLM" = xyes; then
-+ AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting])
-+ fi
-+ else
-+ AC_SUBST(NETTLE_LIBS, "-lnettle")
-+ LIBS="$NETTLE_LIBS $LIBS"
-+ fi
-+ ])
-
-- if test x"$HAVE_NETTLE" = xyes; then
-- AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
-- if test x"$ENABLE_NTLM" != xno
-- then
-+ if test x"$HAVE_NETTLE" = xyes; then
-+ AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
- ENABLE_NTLM=yes
- AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
- fi
include $(TOPDIR)/rules.mk
PKG_NAME:=ncdu
-PKG_VERSION:=1.18.1
+PKG_VERSION:=1.19
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.yorhel.nl/download
-PKG_HASH:=7c0fa1eb29d85aaed4ba174164bdbb8f011b5c390d017c57d668fc7231332405
+PKG_HASH:=30363019180cde0752c7fb006c12e154920412f4e1b5dc3090654698496bb17d
PKG_MAINTAINER:=Charles E. Lehner <cel@celehner.com>
PKG_LICENSE:=MIT
# Additional optional exporters:
-define Package/prometheus-node-exporter-lua-bmx6
- $(call Package/prometheus-node-exporter-lua/Default)
- TITLE+= (bmx6 links collector)
- DEPENDS:=prometheus-node-exporter-lua bmx6 +lua-cjson +bmx6-json
-endef
-
-define Package/prometheus-node-exporter-lua-bmx6/install
- $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
- $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx6.lua $(1)/usr/lib/lua/prometheus-collectors/
-endef
-
define Package/prometheus-node-exporter-lua-bmx7
$(call Package/prometheus-node-exporter-lua/Default)
TITLE+= (bmx7 links collector)
endef
$(eval $(call BuildPackage,prometheus-node-exporter-lua))
-$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx6))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-dawn))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_stations))
include $(TOPDIR)/rules.mk
PKG_NAME:=yq
-PKG_VERSION:=4.35.1
+PKG_VERSION:=4.35.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/mikefarah/yq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b3e079169529ec6b42925d0802c22d86f1ef6e1458dce67eae5a1d6db56cb8c3
+PKG_HASH:=8b17d710c56f764e9beff06d7a7b1c77d87c4ba4219ce4ce67e7ee29670f4f13
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MIT