network: clear existing routes if Gateway= is empty in [Network]

Add support for an empty Gateway= in [Network] to clear the existing
routes. This change will allow users to remove the default route from a
drop-in file.
This commit is contained in:
Quentin Deslandes
2025-11-18 21:36:49 +01:00
committed by Yu Watanabe
parent 9d7a70003d
commit 5b0e262f45
4 changed files with 42 additions and 0 deletions

View File

@@ -747,6 +747,9 @@ DuplicateAddressDetection=none</programlisting></para>
This is a short-hand for a [Route] section only containing a <varname>Gateway=</varname> key.
This option may be specified more than once.</para>
<para>If an empty string is specified, then the all previous assignments in both [Network] and
[Route] sections are cleared.</para>
<xi:include href="version-info.xml" xpointer="v211"/>
</listitem>
</varlistentry>