{"record":{"id":"162de287454343aa","repo":"stamparm/maltrail","slug":"invalid-configuration-value-for-capture-fanout-mode-v","errorCode":null,"errorMessage":"invalid configuration value for 'CAPTURE_FANOUT_MODE' ('{v}')","messagePattern":"invalid configuration value for 'CAPTURE_FANOUT_MODE' \\('(.+?)'\\)","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"sensor/src/config.rs","lineNumber":966,"sourceCode":"        };\n\n        let capture_fanout_mode = {\n            let v = get_str(&raw, \"CAPTURE_FANOUT_MODE\");\n            if v.trim().is_empty() {\n                // Unset. A single worker never forms a fanout group, so the mode is moot there.\n                // Above one it decides whether the scan heuristics survive being split at all -\n                // flow hashing costs 34% of them at 8 workers - so the default is the mode that\n                // does not quietly trade detections for throughput. An operator who wants the old\n                // behaviour asks for it by name.\n                if capture_workers > 1 {\n                    FanoutMode::Source\n                } else {\n                    FanoutMode::Hash\n                }\n            } else {\n                match FanoutMode::parse(&v) {\n                    Some(m) => m,\n                    None => bail!(\"invalid configuration value for 'CAPTURE_FANOUT_MODE' ('{v}')\"),\n                }\n            }\n        };\n\n        let offline_timestamps = {\n            let v = get_str(&raw, \"OFFLINE_TIMESTAMPS\").to_ascii_lowercase();\n            match v.trim() {\n                \"\" | \"pcap\" => TimestampSource::Pcap,\n                \"wallclock\" | \"wall-clock\" | \"now\" => TimestampSource::Wallclock,\n                other => bail!(\"invalid configuration value for 'OFFLINE_TIMESTAMPS' ('{other}')\"),\n            }\n        };\n\n        let sensor_name = {\n            let v = get_str(&raw, \"SENSOR_NAME\");\n            if v.is_empty() {\n                hostname()\n            } else {","sourceCodeStart":948,"sourceCodeEnd":984,"githubUrl":"https://github.com/stamparm/maltrail/blob/77cfb06d7606506d101bbcec0786c77166c4255e/sensor/src/config.rs#L948-L984","documentation":"CAPTURE_FANOUT_MODE selects how captured packets are distributed across processing threads and is parsed with FanoutMode::parse. If the configured string is not a recognized mode name, the loader bails with this message.","triggerScenarios":"Setting CAPTURE_FANOUT_MODE to an unregistered mode string (e.g. 'round-robin', 'rr', 'random') that FanoutMode::parse does not recognize; special values may be handled inline, but everything else must match an enum variant name.","commonSituations":"Admins inventing mode names based on other capture tools' terminology; typos in a valid mode name (wrong case or spelling); configs copied from forks/versions with different mode names.","solutions":["Set CAPTURE_FANOUT_MODE to a supported mode name — check FanoutMode::parse in the sensor source/docs for the exact accepted strings (e.g. hash/flow-based modes).","Fix casing/spelling to match the enum variant names exactly.","Remove the option to use the default fanout mode.","If migrating from another sensor version, map the old mode name to the current set."],"exampleFix":"// before (config.conf)\nCAPTURE_FANOUT_MODE=round-robin\n\n// after (config.conf)\nCAPTURE_FANOUT_MODE=hash","handlingStrategy":"validation","validationCode":"let v = get_str(&raw, \"CAPTURE_FANOUT_MODE\");\nif !v.is_empty() && FanoutMode::parse(&v).is_none() {\n    eprintln!(\"CAPTURE_FANOUT_MODE '{v}' is not a recognized mode\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy mode names from the sensor docs/source (FanoutMode::parse) verbatim.","Omit the option to use the default instead of guessing a name.","Re-validate the value after upgrading sensor versions, as mode names may change."],"tags":["rust","configuration","packet-capture"],"backgroundTag":"invalid-config-value","analyzedSha":"77cfb06d7606506d101bbcec0786c77166c4255e","analyzedAt":"2026-09-13T03:50:16.010Z","contentChangedAt":"2026-09-13T03:50:16.010Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}