mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 10:51:55 +00:00
adblock: update 4.5.1-2
* make sure to only return exactly one MAC address in the cgi Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=adblock
|
||||
PKG_VERSION:=4.5.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ query_mode="$(printf "%s" "${query_str}" | sed -n 's/.*mode=\([^&]*\).*/\1/p' 2>
|
||||
#
|
||||
if [ -z "${query_mac}" ]; then
|
||||
query_ip="${REMOTE_ADDR}"
|
||||
query_mac="$(ip neigh show 2>/dev/null | awk -v ip="${query_ip}" '$1==ip {print $5}' 2>/dev/null)"
|
||||
query_mac="$(ip neigh show 2>/dev/null | awk -v ip="${query_ip}" '$1==ip {print $5; exit}' 2>/dev/null)"
|
||||
fi
|
||||
|
||||
# validate MAC address
|
||||
|
||||
Reference in New Issue
Block a user