Re: dnsmasq compile error: rfc1035.c:978:56: error: 'struct dnsmasq_daemon' has no member named 'workspacename'

2021-09-28 Thread John Thomson
Hi Patrick,

On Tue, 28 Sep 2021, at 09:29, John Thomson wrote:
> This looks like a problem in dnsmasq, because you are building with 
> ubus and contrack, but without dnssec.

Yes, this is a dnsmasq bug which Simon has now fixed upstream:
https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=2c60441239e1c10c4987cb586653b1ea08f703c0

If you want to use these OpenWrt dnsmasq configuration options,
you might be able to patch OpenWrt's dnsmasq by adding the fix to
package/network/services/dnsmasq/patches

Cheers,
-- 
  John Thomson

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: dnsmasq compile error: rfc1035.c:978:56: error: 'struct dnsmasq_daemon' has no member named 'workspacename'

2021-09-28 Thread John Thomson
Hi Patrick,

On Mon, 27 Sep 2021, at 20:21, Patrick Vorlicek wrote:
> make[5]: Entering directory
> '/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86/src'
> arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -fno-caller-saves -fno-plt
> -fhonour-copts -Wno-error=unused-but-set-variable
> -Wno-error=unused-result -mfloat-abi=hard
> -fmacro-prefix-map=/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86=dnsmasq-2.86
> -Wformat -Werror=format-security -DPIC -fpic -fstack-protector
> -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -flto
> -I/root/openwrt/ea8500/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.2.0_musl_eabi/usr/include
> -I/root/openwrt/ea8500/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.2.0_musl_eabi/include/fortify
> -I/root/openwrt/ea8500/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.2.0_musl_eabi/include
> -DHAVE_UBUS -DHAVE_POLL_H   -DHAVE_CONNTRACK -DNO_ID  -DNO_TFTP  
> -DVERSION='"2.86"' 
> -I/root/openwrt/ea8500/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include
>  
> -c rfc1035.c
> rfc1035.c: In function 'report_addresses':
> rfc1035.c:978:56: error: 'struct dnsmasq_daemon' has no member named
> 'workspacename'
>   978 |   if (!extract_name(header, len, ,
> daemon->workspacename, 1, 0))
>   |    ^~
> rfc1035.c:980:66: error: 'struct dnsmasq_daemon' has no member named
> 'workspacename'
>   980 |   if (safe_name(daemon->namebuff) &&
> safe_name(daemon->workspacename))
>   
> |  ^~
> rfc1035.c:981:92: error: 'struct dnsmasq_daemon' has no member named
> 'workspacename'
>   981 |
> ubus_event_bcast_connmark_allowlist_resolved(mark, daemon->namebuff,
> daemon->workspacename, attl);
> 
> | 
>   
> ^~
> make[5]: ***
> [/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86/Makefile:166:
> rfc1035.o] Error 1
> make[5]: Leaving directory
> '/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86/src'
>
> It's a custom build of current master
> (830c2e53781ade1817b03bbb8ece6291ae34df5d) with the following dnsmasq
> config:
>
> # CONFIG_PACKAGE_dnsmasq is not set
> # CONFIG_PACKAGE_dnsmasq-dhcpv6 is not set
> CONFIG_PACKAGE_dnsmasq-full=y
> CONFIG_PACKAGE_dnsmasq_full_dhcp=y
> CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
> # CONFIG_PACKAGE_dnsmasq_full_dnssec is not set
> CONFIG_PACKAGE_dnsmasq_full_auth=y
> CONFIG_PACKAGE_dnsmasq_full_ipset=y
> CONFIG_PACKAGE_dnsmasq_full_conntrack=y
> CONFIG_PACKAGE_dnsmasq_full_noid=y
> # CONFIG_PACKAGE_dnsmasq_full_broken_rtc is not set
> # CONFIG_PACKAGE_dnsmasq_full_tftp is not set


This looks like a problem in dnsmasq, because you are building with ubus and 
contrack,
but without dnssec.
If this is a valid configuration combination for dnsmasq, this is a bug.
Otherwise, we will need to update the OpenWrt package so that these settings 
cannot occur together.

I have included dnsmasq-discuss


daemon->workspacename is guarded by HAVE_DNSSEC in src/dnsmasq.h
extern struct daemon {
…
#ifdef HAVE_DNSSEC
   char *keyname; /* MAXDNAME size buffer */
   char *workspacename; /* ditto */

but access to daemon->workspacename is guarded by
HAVE_CONNTRACK && HAVE_UBUS in src/rfc1035.c

#if defined(HAVE_CONNTRACK) && defined(HAVE_UBUS)
…
void report_addresses(struct dns_header *header, size_t len, u32 mark)
…
   if (!extract_name(header, len, , daemon->workspacename, 1, 0))


Cheers,
-- 
  John Thomson

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


dnsmasq compile error: rfc1035.c:978:56: error: 'struct dnsmasq_daemon' has no member named 'workspacename'

2021-09-27 Thread Patrick Vorlicek
Hello,

I'm having this issue since about a week, normaly such things with core
components are noticed and even fixed by others faster than I have the
time to report it - so maybe I just did something stupid with my
configuration?

make[5]: Entering directory
'/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86/src'
arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -fno-caller-saves -fno-plt
-fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -mfloat-abi=hard
-fmacro-prefix-map=/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86=dnsmasq-2.86
-Wformat -Werror=format-security -DPIC -fpic -fstack-protector
-D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -flto
-I/root/openwrt/ea8500/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.2.0_musl_eabi/usr/include
-I/root/openwrt/ea8500/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.2.0_musl_eabi/include/fortify
-I/root/openwrt/ea8500/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.2.0_musl_eabi/include
-DHAVE_UBUS -DHAVE_POLL_H   -DHAVE_CONNTRACK -DNO_ID  -DNO_TFTP  
-DVERSION='"2.86"' 
-I/root/openwrt/ea8500/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include
 
-c rfc1035.c
rfc1035.c: In function 'report_addresses':
rfc1035.c:978:56: error: 'struct dnsmasq_daemon' has no member named
'workspacename'
  978 |   if (!extract_name(header, len, ,
daemon->workspacename, 1, 0))
  |    ^~
rfc1035.c:980:66: error: 'struct dnsmasq_daemon' has no member named
'workspacename'
  980 |   if (safe_name(daemon->namebuff) &&
safe_name(daemon->workspacename))
  |  ^~
rfc1035.c:981:92: error: 'struct dnsmasq_daemon' has no member named
'workspacename'
  981 |
ubus_event_bcast_connmark_allowlist_resolved(mark, daemon->namebuff,
daemon->workspacename, attl);
 
|   

^~
make[5]: ***
[/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86/Makefile:166:
rfc1035.o] Error 1
make[5]: Leaving directory
'/root/openwrt/ea8500/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/dnsmasq-full/dnsmasq-2.86/src'

It's a custom build of current master
(830c2e53781ade1817b03bbb8ece6291ae34df5d) with the following dnsmasq
config:

# CONFIG_PACKAGE_dnsmasq is not set
# CONFIG_PACKAGE_dnsmasq-dhcpv6 is not set
CONFIG_PACKAGE_dnsmasq-full=y
CONFIG_PACKAGE_dnsmasq_full_dhcp=y
CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
# CONFIG_PACKAGE_dnsmasq_full_dnssec is not set
CONFIG_PACKAGE_dnsmasq_full_auth=y
CONFIG_PACKAGE_dnsmasq_full_ipset=y
CONFIG_PACKAGE_dnsmasq_full_conntrack=y
CONFIG_PACKAGE_dnsmasq_full_noid=y
# CONFIG_PACKAGE_dnsmasq_full_broken_rtc is not set
# CONFIG_PACKAGE_dnsmasq_full_tftp is not set

A make dirclean does not help, the target is ipq806x, host is Ubuntu
20.04. Any idea what I did wrong?

-- 
Viele Grüße,
Patrick Vorlicek


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel