Effective config: conntrack as flag; avoid key-only directives for empty non-flag values

- Model conntrack as Flag (parser, config bool, cache, registry FlagValueDisplay)
- Apply: for non-flag options with empty/invalid value, remove existing line
  and never write key-only directive (was producing malformed option= without value)
This commit is contained in:
2026-03-02 22:52:27 +10:00
parent 5f728900dc
commit baaba38e23
6 changed files with 23 additions and 8 deletions
@@ -286,7 +286,7 @@ public static class EffectiveConfigParserBehaviorMap
[DnsmasqConfKeys.LogDhcp] = EffectiveConfigParserBehavior.Flag,
[DnsmasqConfKeys.KeepInForeground] = EffectiveConfigParserBehavior.Flag,
[DnsmasqConfKeys.NoDaemon] = EffectiveConfigParserBehavior.Flag,
[DnsmasqConfKeys.Conntrack] = EffectiveConfigParserBehavior.LastWins,
[DnsmasqConfKeys.Conntrack] = EffectiveConfigParserBehavior.Flag,
};
/// <summary>Returns LastWins, Flag, or Multi for the given option name; defaults to LastWins if unknown.</summary>