Browse Source

https-dns-proxy: update to 2021-05-14-1; bugfixes for dhcp server backup

Signed-off-by: Stan Grishin <stangri@melmac.net>
lilik-openwrt-22.03
Stan Grishin 4 years ago
parent
commit
cf75ad2e6c
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
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_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_LICENSE:=MIT
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
# Copyright 2019-2020 Stan Grishin (stangri@melmac.net)
# shellcheck disable=SC2039
# shellcheck disable=SC2039,SC3043,SC3060
PKG_VERSION='dev-test'
# shellcheck disable=SC2034
@ -171,7 +171,7 @@ dnsmasq_add_doh_server() {
dnsmasq_create_server_backup() {
local cfg="$1"
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 [ -z "$(uci -q get "dhcp.${cfg}.noresolv")" ]; then
uci -q set "dhcp.${cfg}.noresolv=1"
@ -182,13 +182,17 @@ dnsmasq_create_server_backup() {
fi
fi
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
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"
fi
done
fi
return 0
}
dnsmasq_restore_server_backup() {
@ -221,7 +225,8 @@ dhcp_backup() {
config_foreach dnsmasq_create_server_backup 'dnsmasq'
elif [ -n "$dnsmasqConfig" ]; then
for i in $dnsmasqConfig; do
dnsmasq_create_server_backup "@dnsmasq[${i}]"
dnsmasq_create_server_backup "@dnsmasq[${i}]" || \
dnsmasq_create_server_backup "$i"
done
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
+++ b/src/logging.h
@@ -34,6 +34,20 @@ enum _LogSeverity {
LOG_FATAL = 4,
@@ -36,6 +36,20 @@ enum _LogSeverity {
LOG_MAX
};
+#define STRIPPATH(s)\
@ -28,6 +18,6 @@
+
+#define __FILENAME__ STRIPPATH(__FILE__)
+
// Debug, Info, Warning, Error logging.
#define DLOG(...) _log(__FILENAME__, __LINE__, LOG_DEBUG, __VA_ARGS__)
#define ILOG(...) _log(__FILENAME__, __LINE__, LOG_INFO, __VA_ARGS__)
#define WLOG(...) _log(__FILENAME__, __LINE__, LOG_WARNING, __VA_ARGS__)

Loading…
Cancel
Save