Package: dnsmasq Version: 2.80-1 Severity: normal Tags: ipv6 patch upstream
Hello, Situation: My ISP doesn't offer IPv6 prefix delegation and just gives /64 IPv6 address. I configure my router with ndppd (NDP Proxy Daemon), running dnsmasq for internal network. It mostly works, but I observed no periodical IPv6 Router Advertisement (only reply to Router Solicitation) to internal network. With a line in dnsmasq.conf: no-dhcp-interface=<external_interface_with_same_ipv6_net> interface=<internal_interface_with_ipv6_net> I expected dnsmasq does IPv6 Router Advertisement, even though these interfaces share same IPv6 network address. It does for Router Solicitation request, but no periodical ones. I think I found a problem in src/radv.c. When an interface is searched, it doesn't skip interfaces with no-dhcp-interface, so, invalid interface may be identified. (Note that in the periodic_ra function, there is code to skip the interface _after_ interface is identified.) When I applied following patch, I started to observe IPv6 Router Advertisement in internal network. I'm not sure if this patch is correct, or good one. This is for sharing the problem. diff --git a/src/radv.c b/src/radv.c index cad0530..82f9603 100644 --- a/src/radv.c +++ b/src/radv.c @@ -917,6 +917,17 @@ static int iface_search(struct in6_addr *local, int prefix, param->iface = 0; return 0; } + + { + struct iname *tmp; + for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next) + if (tmp->name && wildcard_match(tmp->name, param->name)) + break; + + /* Skip this interface. */ + if (tmp) + return 1; + } new_timeout(context, param->name, param->now); -- System Information: Debian Release: 10.2 APT prefers stable APT policy: (990, 'stable'), (500, 'stable-debug'), (500, 'unstable'), (500, 'oldstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-6-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages dnsmasq depends on: ii dnsmasq-base [dnsmasq-base] 2.80-1 ii init-system-helpers 1.56+nmu1 ii lsb-base 10.2019051400 ii netbase 5.6 dnsmasq recommends no packages. Versions of packages dnsmasq suggests: pn resolvconf <none> -- Configuration Files: /etc/default/dnsmasq changed [not included] -- no debconf information