Skip to content

IPv6 RA processing results in excessive load and pointless churn #8759

@0xabu

Description

@0xabu

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

I have a WAN interface (ax0) configured using SLAAC, with DHCPv6 only for prefix delegation. My ISP (Init7) sends an IPv6 RA (including DNS servers and prefix info) every 9-10s. As best I can tell, this causes the following:

  1. rtsold runs /var/etc/rtsold_script.sh, which in turn sends SIGHUP (twice?) to dhcp6c
  2. rtsold runs /usr/local/opnsense/scripts/interfaces/rtsold_resolvconf.sh, which:
    a. deletes and re-adds all the ipv6 nameservers
    b. invokes configctl -d interface newipv6 aka /usr/local/etc/rc.newwanipv6 which does a lot including system_resolver_configure which causes /etc/hosts and /etc/resolv.conf to get rewritten
  3. dnsmasq notices that /etc/resolv.conf changed, and noisily reconfigures itself

Since this happens frequently, yet every RA contains the same configuration information, this feels awfully wasteful, both in terms of CPU load and SSD write wear for all the log messages. Couldn't there be a check fairly early (I'd imagine even in rtsold!) that discards redundant updates?

To Reproduce

Steps to reproduce the behavior:

  1. Sign up with init7.net :)
  2. Configure the WAN interface with DHCP + DHCPv6 (basic config, with "Request prefix only" checked and
    Prefix delegation size of 48)
  3. Enable dnsmasq + unbound following https://docs.opnsense.org/manual/dnsmasq.html#dhcpv4-with-dns-registration
  4. Inspect log files and top

Expected behavior

Frequent RAs do not induce log entries and system load.

Describe alternatives you considered

I could hack a short-circuit to avoid most of this into rtsold_resolvconf.sh myself, but I'd probably break something.

Relevant log files

https://forum.opnsense.org/index.php?topic=47469.0 was my initial debugging, and shows some of the log spam this induces. I'm happy to gather more info if needed.

Environment

OPNsense 25.1.7_4-amd64 on DEC740

Metadata

Metadata

Assignees

Labels

featureAdding new functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions