Browse Source

Merge pull request #15715 from stangri/master-https-dns-proxy

https-dns-proxy: update to 2021-05-14-1; bugfixes for dhcp server backup
lilik-openwrt-22.03
Rosen Penev 3 years ago
committed by GitHub
parent
commit
d4f697db7b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 22 deletions
  1. +5
    -5
      net/https-dns-proxy/Makefile
  2. +9
    -4
      net/https-dns-proxy/files/https-dns-proxy.init
  3. +3
    -13
      net/https-dns-proxy/patches/010-ninja.patch

+ 5
- 5
net/https-dns-proxy/Makefile View File

@ -1,14 +1,14 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=https-dns-proxy PKG_NAME:=https-dns-proxy
PKG_VERSION:=2021-01-17
PKG_RELEASE:=5
PKG_VERSION:=2021-05-14
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy
PKG_SOURCE_DATE:=2021-01-17
PKG_SOURCE_VERSION:=37511cc08712d7548978a4f6f1cc457b7594fb96
PKG_MIRROR_HASH:=4e6a7dcb69e350d1df9f17570439b589e031e249da7f91f2ec7600a955e0aaa3
PKG_SOURCE_DATE:=2021-05-14
PKG_SOURCE_VERSION:=fa05dcfc46ff6d58999aab1e35bcf1b36b1eb19e
PKG_MIRROR_HASH:=4fd40c4e64010c5c49629a4de830ab6e53c649458f0adeda5399b350cbe7f319
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net> PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
PKG_LICENSE:=MIT PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE


+ 9
- 4
net/https-dns-proxy/files/https-dns-proxy.init View File

@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright 2019-2020 Stan Grishin (stangri@melmac.net) # Copyright 2019-2020 Stan Grishin (stangri@melmac.net)
# shellcheck disable=SC2039
# shellcheck disable=SC2039,SC3043,SC3060
PKG_VERSION='dev-test' PKG_VERSION='dev-test'
# shellcheck disable=SC2034 # shellcheck disable=SC2034
@ -171,7 +171,7 @@ dnsmasq_add_doh_server() {
dnsmasq_create_server_backup() { dnsmasq_create_server_backup() {
local cfg="$1" local cfg="$1"
local i local i
uci -q get "dhcp.${cfg}" >/dev/null || return 0
uci -q get "dhcp.${cfg}" >/dev/null || return 1
if ! uci -q get "dhcp.${cfg}.doh_backup_noresolv" >/dev/null; then if ! uci -q get "dhcp.${cfg}.doh_backup_noresolv" >/dev/null; then
if [ -z "$(uci -q get "dhcp.${cfg}.noresolv")" ]; then if [ -z "$(uci -q get "dhcp.${cfg}.noresolv")" ]; then
uci -q set "dhcp.${cfg}.noresolv=1" uci -q set "dhcp.${cfg}.noresolv=1"
@ -182,13 +182,17 @@ dnsmasq_create_server_backup() {
fi fi
fi fi
if ! uci -q get "dhcp.${cfg}.doh_backup_server" >/dev/null; then if ! uci -q get "dhcp.${cfg}.doh_backup_server" >/dev/null; then
if [ -z "$(uci -q get "dhcp.${cfg}.server")" ]; then
uci -q add_list "dhcp.${cfg}.doh_backup_server="
fi
for i in $(uci -q get "dhcp.${cfg}.server"); do for i in $(uci -q get "dhcp.${cfg}.server"); do
uci -q add_list "dhcp.${cfg}.doh_backup_server=$i" uci -q add_list "dhcp.${cfg}.doh_backup_server=$i"
if [ "$i" = "${i//127.0.0.1}" ] && [ "$i" = "$(echo "$i" | tr -d /)" ]; then
if [ "$i" = "$(echo "$i" | tr -d /\#)" ]; then
uci -q del_list "dhcp.${cfg}.server=$i" uci -q del_list "dhcp.${cfg}.server=$i"
fi fi
done done
fi fi
return 0
} }
dnsmasq_restore_server_backup() { dnsmasq_restore_server_backup() {
@ -221,7 +225,8 @@ dhcp_backup() {
config_foreach dnsmasq_create_server_backup 'dnsmasq' config_foreach dnsmasq_create_server_backup 'dnsmasq'
elif [ -n "$dnsmasqConfig" ]; then elif [ -n "$dnsmasqConfig" ]; then
for i in $dnsmasqConfig; do for i in $dnsmasqConfig; do
dnsmasq_create_server_backup "@dnsmasq[${i}]"
dnsmasq_create_server_backup "@dnsmasq[${i}]" || \
dnsmasq_create_server_backup "$i"
done done
fi fi
;; ;;


+ 3
- 13
net/https-dns-proxy/patches/010-ninja.patch View File

@ -1,17 +1,7 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,6 @@ set(CMAKE_BUILD_TYPE "Debug")
#set(CMAKE_BUILD_TYPE "Release")
#set(CMAKE_C_FLAGS "-Wall -Wextra --pedantic -Wno-strict-aliasing")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(notdir $<)\"'")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_RELEASE "-O2")
--- a/src/logging.h --- a/src/logging.h
+++ b/src/logging.h +++ b/src/logging.h
@@ -34,6 +34,20 @@ enum _LogSeverity {
LOG_FATAL = 4,
@@ -36,6 +36,20 @@ enum _LogSeverity {
LOG_MAX
}; };
+#define STRIPPATH(s)\ +#define STRIPPATH(s)\
@ -28,6 +18,6 @@
+ +
+#define __FILENAME__ STRIPPATH(__FILE__) +#define __FILENAME__ STRIPPATH(__FILE__)
+ +
// Debug, Info, Warning, Error logging.
#define DLOG(...) _log(__FILENAME__, __LINE__, LOG_DEBUG, __VA_ARGS__) #define DLOG(...) _log(__FILENAME__, __LINE__, LOG_DEBUG, __VA_ARGS__)
#define ILOG(...) _log(__FILENAME__, __LINE__, LOG_INFO, __VA_ARGS__) #define ILOG(...) _log(__FILENAME__, __LINE__, LOG_INFO, __VA_ARGS__)
#define WLOG(...) _log(__FILENAME__, __LINE__, LOG_WARNING, __VA_ARGS__)

Loading…
Cancel
Save