The problem happens when the parser needs a second pass to find all the interfaces. It doesn't check if the values are already in their lists.
The problem is not limited to the DNS entries.
Here is another example:
network: bonds: aggi: routing-policy: - table: 1 from: 1.2.3.4 nameservers: addresses: - 8.8.8.8 search: - example.com interfaces: - ens3f0 ethernets: ens3f0: {}
The .netdev file will look like this:
[Match] Name=aggi
[Network] LinkLocalAddressing=ipv6 DNS=8.8.8.8 DNS=8.8.8.8 Domains=example.com example.com ConfigureWithoutCarrier=yes
[RoutingPolicyRule] From=1.2.3.4 Table=1
The problem happens when the parser needs a second pass to find all the interfaces. It doesn't check if the values are already in their lists.
The problem is not limited to the DNS entries.
Here is another example:
network: policy:
bonds:
aggi:
routing-
- table: 1
from: 1.2.3.4
nameservers:
addresses:
- 8.8.8.8
search:
- example.com
interfaces:
- ens3f0
ethernets:
ens3f0: {}
The .netdev file will look like this:
[Match]
Name=aggi
[Network] sing=ipv6 tCarrier= yes
LinkLocalAddres
DNS=8.8.8.8
DNS=8.8.8.8
Domains=example.com example.com
ConfigureWithou
[RoutingPolicyRule]
From=1.2.3.4
Table=1
[RoutingPolicyRule]
From=1.2.3.4
Table=1