{"record":{"id":"2d1f90bdd2d84e91","repo":"AdguardTeam/AdGuardHome","slug":"dialing-v6-w","errorCode":null,"errorMessage":"dialing v6: %w","messagePattern":"dialing v6: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ipset/ipset_linux.go","lineNumber":224,"sourceCode":"\t// TODO(schzen):  Use netip.Addr.\n\tipArr [net.IPv6len]byte\n}\n\n// dialNetfilter establishes connections to Linux's netfilter module.\nfunc (m *manager) dialNetfilter(conf *netlink.Config) (err error) {\n\t// The kernel API does not actually require two sockets but package\n\t// github.com/digineo/go-ipset does.\n\t//\n\t// TODO(a.garipov): Perhaps we can ditch package ipset altogether and just\n\t// use packages netfilter and netlink.\n\tm.ipv4Conn, err = m.dial(netfilter.ProtoIPv4, conf)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"dialing v4: %w\", err)\n\t}\n\n\tm.ipv6Conn, err = m.dial(netfilter.ProtoIPv6, conf)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"dialing v6: %w\", err)\n\t}\n\n\treturn nil\n}\n\n// parseIpsetConfigLine parses one ipset configuration line.\nfunc parseIpsetConfigLine(confStr string) (hosts, ipsetNames []string, err error) {\n\tconfStr = strings.TrimSpace(confStr)\n\thostsAndNames := strings.Split(confStr, \"/\")\n\tif len(hostsAndNames) != 2 {\n\t\treturn nil, nil, fmt.Errorf(\"invalid value %q: expected one slash\", confStr)\n\t}\n\n\thosts = strings.Split(hostsAndNames[0], \",\")\n\tipsetNames = strings.Split(hostsAndNames[1], \",\")\n\n\tif len(ipsetNames) == 0 {\n\t\treturn nil, nil, nil","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/ipset/ipset_linux.go#L206-L242","documentation":"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.","triggerScenarios":"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.","commonSituations":"Hardened VMs or containers with IPv6 disabled via grub (ipv6.disable=1), minimal kernel images without ip6_nf modules, sysctl disable_ipv6 set.","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"],"exampleFix":"# before\nsysctl -w net.ipv6.conf.all.disable_ipv6=1\n# after\nsysctl -w net.ipv6.conf.all.disable_ipv6=0","handlingStrategy":"validation","validationCode":"func ipv6Available() bool {\n\tifaces, _ := net.Interfaces()\n\tfor _, i := range ifaces {\n\t\tif i.Flags&net.FlagUp != 0 && i.Addrs() != nil {\n\t\t\tfor _, a := range addrs(i) { if a.IP.To4() == nil { return true } }\n\t\t}\n\t}\n\treturn false\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure ipv6 module is loaded (not blacklisted) on hosts using ipset","Test with 'ping -6 ::1' or 'ip -6 addr' before enabling ipset"],"tags":["ipset","netfilter","ipv6","linux"],"backgroundTag":"ipv6-disabled-or-unavailable","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}