adblock: update to 4.2.2-5
authorDirk Brenken <dev@brenken.org>
Fri, 20 Sep 2024 03:57:24 +0000 (05:57 +0200)
committerDirk Brenken <dev@brenken.org>
Fri, 20 Sep 2024 03:57:24 +0000 (05:57 +0200)
* filter out unrelated multicast traffic from reporting

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/adblock/Makefile
net/adblock/files/adblock.sh

index a14b74e1bb17f1185e24f8bde8c1643167e92f98..ea3d74d382f75dbfc592c0b872e8355eb560abd4 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.2.2
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 4f2948d51e74f306d68e7c0ed8180b45c4b8e843..9b15ad8b67b376de10d4ab4761696311af4e96b5 100755 (executable)
@@ -11,7 +11,7 @@
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 
-adb_ver="4.2.2-r4"
+adb_ver="4.2.2-r5"
 adb_enabled="0"
 adb_debug="0"
 adb_forcedns="0"
@@ -1330,7 +1330,8 @@ f_report() {
                                                        {domain=substr($(NF-1),1,length($(NF-1))-1);type="RQ"}
                                                else
                                                        {if($(NF-2)~/NXDomain/||$(NF-1)=="0.0.0.0"){type="NX"}else{type="OK"};domain=""};
-                                               printf "%08d\t%s\t%s\t%s\t%-25s\t%s\n",$9,type,$1,substr($2,1,8),$6,domain}' >>"${report_raw}"
+                                               if(int($9)>0)
+                                                       printf "%08d\t%s\t%s\t%s\t%-25s\t%s\n",$9,type,$1,substr($2,1,8),$6,domain}' >>"${report_raw}"
                                else
                                        "${adb_dumpcmd}" "${resolve}" --immediate-mode -T domain -tttt -r "${file}" 2>/dev/null |
                                        "${adb_awkcmd}" -v cnt="${cnt}" '!/\.lan\. |PTR\? | SOA\? | Flags /&&/ A[A]*\? |NXDomain|0\.0\.0\.0|[0-9]\/[0-9]\/[0-9]/{sub(/\.[0-9]+$/,"",$4);
@@ -1339,7 +1340,8 @@ f_report() {
                                                        {domain=substr($(NF-1),1,length($(NF-1))-1);type="RQ"}
                                                else
                                                        {if($(NF-2)~/NXDomain/||$(NF-1)=="0.0.0.0"){type="NX"}else{type="OK"};domain=""};
-                                               printf "%08d\t%s\t%s\t%s\t%-25s\t%s\n",$7,type,$1,substr($2,1,8),$4,domain}' >>"${report_raw}"
+                                               if(int($7)>0)
+                                                       printf "%08d\t%s\t%s\t%s\t%-25s\t%s\n",$7,type,$1,substr($2,1,8),$4,domain}' >>"${report_raw}"
                                fi
                        ) &
                        hold="$((cnt % adb_cores))"