Skip to content

Commit

Permalink
dnsmasq: update to git HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
HiGarfield committed Nov 28, 2023
1 parent d4d678a commit 4d19a4b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
13 changes: 5 additions & 8 deletions package/network/services/dnsmasq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>

--- 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);

Expand All @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>

--- 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)
Expand All @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>
#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);
Expand All @@ -56,7 +56,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>
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)
{
Expand All @@ -70,7 +70,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>
(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;
}

Expand Down Expand Up @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>
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);
}
Expand Down
18 changes: 9 additions & 9 deletions package/network/services/dnsmasq/patches/200-ubus_dns.patch
Original file line number Diff line number Diff line change
@@ -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];
}

Expand All @@ -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
Expand Down Expand Up @@ -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 */
}

Expand Down Expand Up @@ -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);
Expand All @@ -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;

Expand All @@ -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 */
Expand All @@ -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. */
Expand All @@ -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,
};

Expand All @@ -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;
Expand Down

0 comments on commit 4d19a4b

Please sign in to comment.