AdguardTeam/AdGuardHome · error
dialing v6: %w
Error message
dialing v6: %w
What it means
Raised when the ipset manager fails to open the netfilter socket for IPv6 during initialization, after the IPv4 dial succeeded. Typically the kernel has no IPv6 support (module unloaded/disabled) or IPv6 netfilter is unavailable.
Source
Thrown at internal/ipset/ipset_linux.go:224
// TODO(schzen): Use netip.Addr.
ipArr [net.IPv6len]byte
}
// dialNetfilter establishes connections to Linux's netfilter module.
func (m *manager) dialNetfilter(conf *netlink.Config) (err error) {
// The kernel API does not actually require two sockets but package
// github.com/digineo/go-ipset does.
//
// TODO(a.garipov): Perhaps we can ditch package ipset altogether and just
// use packages netfilter and netlink.
m.ipv4Conn, err = m.dial(netfilter.ProtoIPv4, conf)
if err != nil {
return fmt.Errorf("dialing v4: %w", err)
}
m.ipv6Conn, err = m.dial(netfilter.ProtoIPv6, conf)
if err != nil {
return fmt.Errorf("dialing v6: %w", err)
}
return nil
}
// parseIpsetConfigLine parses one ipset configuration line.
func parseIpsetConfigLine(confStr string) (hosts, ipsetNames []string, err error) {
confStr = strings.TrimSpace(confStr)
hostsAndNames := strings.Split(confStr, "/")
if len(hostsAndNames) != 2 {
return nil, nil, fmt.Errorf("invalid value %q: expected one slash", confStr)
}
hosts = strings.Split(hostsAndNames[0], ",")
ipsetNames = strings.Split(hostsAndNames[1], ",")
if len(ipsetNames) == 0 {
return nil, nil, nilView on GitHub (pinned to b41aefbe51)
Solutions
- Enable IPv6 or load required modules (modprobe ip6table_filter / nfnetlink)
- Check sysctl net.ipv6.conf.all.disable_ipv6
- If IPv6 is intentionally disabled, disable the ipset feature or patch the manager to tolerate a missing v6 connection
Example fix
# before sysctl -w net.ipv6.conf.all.disable_ipv6=1 # after sysctl -w net.ipv6.conf.all.disable_ipv6=0
Defensive patterns
Strategy: validation
Validate before calling
func ipv6Available() bool {
ifaces, _ := net.Interfaces()
for _, i := range ifaces {
if i.Flags&net.FlagUp != 0 && i.Addrs() != nil {
for _, a := range addrs(i) { if a.IP.To4() == nil { return true } }
}
}
return false
} Prevention
- Ensure ipv6 module is loaded (not blacklisted) on hosts using ipset
- Test with 'ping -6 ::1' or 'ip -6 addr' before enabling ipset
When it happens
Trigger: newManagerWithDialer dials ProtoIPv6 and the kernel returns an error because ipv6.ko is blacklisted, net.ipv6.conf.all.disable_ipv6=1, or ip6table/netfilter v6 modules are missing.
Common situations: Hardened VMs or containers with IPv6 disabled via grub (ipv6.disable=1), minimal kernel images without ip6_nf modules, sysctl disable_ipv6 set.
Related errors
- dialing v4: %w
- dialing netfilter: %w
- unexpected family %s for ipset %q
- %q %q unexpected family %q
- resetting dhcpv6 leases: %w
AI-assisted analysis of AdguardTeam/AdGuardHome@b41aefbe51 (2026-08-27).
Data as JSON: /api/errors/2d1f90bdd2d84e91.
Report an issue: GitHub.