{"record":{"id":"8a21da7e9e3fc27e","repo":"AdguardTeam/AdGuardHome","slug":"getting-ipsets-w","errorCode":null,"errorMessage":"getting ipsets: %w","messagePattern":"getting ipsets: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ipset/ipset_linux.go","lineNumber":401,"sourceCode":"\t\taddedIPs: container.NewMapSet[ipInIpsetEntry](),\n\t}\n\n\terr = m.dialNetfilter(&netlink.Config{})\n\tif err != nil {\n\t\tif errors.Is(err, unix.EPROTONOSUPPORT) {\n\t\t\t// The implementation doesn't support this protocol version.  Just\n\t\t\t// issue a warning.\n\t\t\tm.logger.WarnContext(ctx, \"dialing netfilter\", slogutil.KeyError, err)\n\n\t\t\treturn nil, nil\n\t\t}\n\n\t\treturn nil, fmt.Errorf(\"dialing netfilter: %w\", err)\n\t}\n\n\terr = m.parseIpsetConfig(ctx, conf.Lines)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting ipsets: %w\", err)\n\t}\n\n\tm.logger.DebugContext(ctx, \"initialized\")\n\n\treturn m, nil\n}\n\n// lookupHost find the ipsets for the host, taking subdomain wildcards into\n// account.\nfunc (m *manager) lookupHost(host string) (sets []props) {\n\t// Search for matching ipset hosts starting with most specific domain.\n\t// We could use a trie here but the simple, inefficient solution isn't\n\t// that expensive: ~10 ns for TLD + SLD vs. ~140 ns for 10 subdomains on\n\t// an AMD Ryzen 7 PRO 4750U CPU; ~120 ns vs. ~ 1500 ns on a Raspberry\n\t// Pi's ARMv7 rev 4 CPU.\n\tfor i := 0; ; i++ {\n\t\thost = host[i:]\n\t\tsets = m.domainToIpsets[host]","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/ipset/ipset_linux.go#L383-L419","documentation":"Wraps a failure while parsing and resolving the ipset config lines (see 384/385/387) during manager creation. The inner error identifies the bad line or missing set.","triggerScenarios":"parseIpsetConfig returns an error for any config line: bad syntax, empty name, unknown set, or failed header query.","commonSituations":"Misformatted YAML ipset lines or references to sets not created on the host.","solutions":["Read the inner error for line index and cause","Fix the config line or create the missing ipset","Restart the service"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := mgr.Start(ctx); err != nil {\n\tif inner := errors.Unwrap(err); inner != nil { log.Printf(\"ipset config problem: %v\", inner) }\n\treturn err\n}","preventionTips":["Dry-run config parsing with a validation tool before deploy","Keep ipset lines under version control with review"],"tags":["ipset","config","initialization"],"backgroundTag":"config-format-invalid","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}