{"record":{"id":"228b992de1b2e805","repo":"AdguardTeam/AdGuardHome","slug":"invalid-value-q-expected-one-slash","errorCode":null,"errorMessage":"invalid value %q: expected one slash","messagePattern":"invalid value %q: expected one slash","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ipset/ipset_linux.go","lineNumber":235,"sourceCode":"\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\n\t}\n\n\tfor i := range ipsetNames {\n\t\tipsetNames[i] = strings.TrimSpace(ipsetNames[i])\n\t\tif len(ipsetNames[i]) == 0 {\n\t\t\treturn nil, nil, fmt.Errorf(\"invalid value %q: empty ipset name\", confStr)\n\t\t}\n\t}\n\n\tfor i := range hosts {\n\t\thosts[i] = strings.ToLower(strings.TrimSpace(hosts[i]))","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/ipset/ipset_linux.go#L217-L253","documentation":"Each ipset configuration line must have the form 'host1,host2/ipset1,ipset2'. This error means the line did not contain exactly one '/' separator after trimming.","triggerScenarios":"parseIpsetConfigLine is called with a conf.Lines entry like 'example.org' (no slash), 'a/b/c' (two slashes), or 'a / b / c'.","commonSituations":"YAML config typo: using spaces instead of a slash, forgetting the ipset part, or including a URL-like value in the ipset config line.","solutions":["Rewrite the line as 'domain[,domain...]/ipsetname[,ipsetname...]'","Remove stray slashes or empty lines that aren't blank","Reload/restart the service after fixing the config"],"exampleFix":"# before\n- example.org\n# after\n- example.org/myset","handlingStrategy":"validation","validationCode":"func validIpsetLine(line string) bool {\n\tparts := strings.Split(strings.TrimSpace(line), \"/\")\n\treturn len(parts) == 2\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate every config line with a split-on-slash check before passing Lines","Add config schema tests in CI"],"tags":["ipset","config","validation"],"backgroundTag":"config-format-invalid","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}