From 4d19a4b5f68070f3ee14f9032d15687bc8476c97 Mon Sep 17 00:00:00 2001 From: HiGarfield Date: Wed, 29 Nov 2023 02:26:39 +0800 Subject: [PATCH] dnsmasq: update to git HEAD --- package/network/services/dnsmasq/Makefile | 13 +++++-------- ...100-remove-old-runtime-kernel-support.patch | 12 ++++++------ .../dnsmasq/patches/200-ubus_dns.patch | 18 +++++++++--------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 2d4afcb1c..b6f0edc48 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,20 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.89 -PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz -PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_HASH:=02bd230346cf0b9d5909f5e151df168b2707103785eb616b56685855adebb609 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=http://thekelleys.org.uk/git/dnsmasq.git +PKG_SOURCE_VERSION:=65c2d6afd67a032f45f40d7e4d620f5d73e5f07d +PKG_MIRROR_HASH:=skip +PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:thekelleys:dnsmasq -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_UPSTREAM_VERSION) - PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_ASLR_PIE_REGULAR:=1 diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index 557907d77..9d3e9dee9 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -103,10 +103,6 @@ int main (int argc, char **argv) +@@ -105,10 +105,6 @@ int main (int argc, char **argv) read_opts(argc, argv, compile_opts); @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1247,7 +1247,7 @@ extern struct daemon { +@@ -1269,7 +1269,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1452,9 +1452,6 @@ int read_write(int fd, unsigned char *packet, int size, int rw); +@@ -1479,9 +1479,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -56,7 +56,7 @@ Signed-off-by: Kevin Darbyshire-Bryant static char *buffer; static inline void add_attr(struct nlmsghdr *nlh, uint16_t type, size_t len, const void *data) -@@ -85,12 +85,7 @@ static inline void add_attr(struct nlmsghdr *nlh, uint16_t type, size_t len, con +@@ -85,12 +85,7 @@ static inline void add_attr(struct nlmsg void ipset_init(void) { @@ -70,7 +70,7 @@ Signed-off-by: Kevin Darbyshire-Bryant (buffer = safe_malloc(BUFF_SZ)) && (ipset_sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_NETFILTER)) != -1 && (bind(ipset_sock, (struct sockaddr *)&snl, sizeof(snl)) != -1)) -@@ -147,65 +142,14 @@ static int new_add_to_ipset(const char *setname, const union all_addr *ipaddr, i +@@ -147,65 +142,14 @@ static int new_add_to_ipset(const char * return errno == 0 ? 0 : -1; } @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/util.c +++ b/src/util.c -@@ -855,22 +855,3 @@ int wildcard_matchn(const char* wildcard, const char* match, int num) +@@ -866,22 +866,3 @@ int wildcard_matchn(const char* wildcard return (!num) || (*wildcard == *match); } diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index 37c2772f1..f827def1c 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -1,6 +1,6 @@ --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -2003,6 +2003,10 @@ static void check_dns_listeners(time_t now) +@@ -2009,6 +2009,10 @@ static void check_dns_listeners(time_t n daemon->pipe_to_parent = pipefd[1]; } @@ -13,7 +13,7 @@ s->tcpfd = -1; --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1631,14 +1631,26 @@ void emit_dbus_signal(int action, struct dhcp_lease *lease, char *hostname); +@@ -1657,14 +1657,26 @@ void emit_dbus_signal(int action, struct /* ubus.c */ #ifdef HAVE_UBUS @@ -54,7 +54,7 @@ int extract_name(struct dns_header *header, size_t plen, unsigned char **pp, char *name, int isExtract, int extrabytes) -@@ -394,9 +396,64 @@ static int private_net6(struct in6_addr *a, int ban_localhost) +@@ -384,9 +386,64 @@ static int private_net6(struct in6_addr ((u32 *)a)[0] == htonl(0x20010db8); /* RFC 6303 4.6 */ } @@ -120,7 +120,7 @@ for (i = count; i != 0; i--) { -@@ -405,7 +462,7 @@ static unsigned char *do_doctor(unsigned char *p, int count, struct dns_header * +@@ -395,7 +452,7 @@ static unsigned char *do_doctor(unsigned GETSHORT(qtype, p); GETSHORT(qclass, p); @@ -129,7 +129,7 @@ GETSHORT(rdlen, p); if (qclass == C_IN && qtype == T_A) -@@ -416,6 +473,9 @@ static unsigned char *do_doctor(unsigned char *p, int count, struct dns_header * +@@ -406,6 +463,9 @@ static unsigned char *do_doctor(unsigned if (!CHECK_LEN(header, p, qlen, INADDRSZ)) return 0; @@ -139,7 +139,7 @@ /* alignment */ memcpy(&addr, p, INADDRSZ); -@@ -433,13 +493,22 @@ static unsigned char *do_doctor(unsigned char *p, int count, struct dns_header * +@@ -423,13 +483,22 @@ static unsigned char *do_doctor(unsigned addr.s_addr &= ~doctor->mask.s_addr; addr.s_addr |= (doctor->out.s_addr & doctor->mask.s_addr); /* Since we munged the data, the server it came from is no longer authoritative */ @@ -164,7 +164,7 @@ if (!ADD_RDLEN(header, p, qlen, rdlen)) return 0; /* bad packet */ } -@@ -570,7 +639,7 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t +@@ -558,7 +627,7 @@ int extract_addresses(struct dns_header cache_start_insert(); /* find_soa is needed for dns_doctor side effects, so don't call it lazily if there are any. */ @@ -175,7 +175,7 @@ ttl = find_soa(header, qlen, doctored); --- a/src/ubus.c +++ b/src/ubus.c -@@ -72,6 +72,13 @@ static struct ubus_object ubus_object = { +@@ -72,6 +72,13 @@ static struct ubus_object ubus_object = .subscribe_cb = ubus_subscribe_cb, }; @@ -189,7 +189,7 @@ static void ubus_subscribe_cb(struct ubus_context *ctx, struct ubus_object *obj) { (void)ctx; -@@ -105,13 +112,21 @@ static void ubus_disconnect_cb(struct ubus_context *ubus) +@@ -105,13 +112,21 @@ static void ubus_disconnect_cb(struct ub char *ubus_init() { struct ubus_context *ubus = NULL;