mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
nixos/networking/keepalived: do not emit unicastPeers when there are none
In the past, we emitted `unicast_peer` block even with empty unicast peers list. This now results in: ``` Keepalived_vrrp[392762]: A unicast keyword has been specified without any unicast peers. Defaulting to multicast. This usage is deprecated - please update your configuration. ``` We do not emit it anymore to avoid this warning.
This commit is contained in:
@@ -59,9 +59,11 @@ let
|
||||
${optionalString i.vmacXmitBase "vmac_xmit_base"}
|
||||
|
||||
${optionalString (i.unicastSrcIp != null) "unicast_src_ip ${i.unicastSrcIp}"}
|
||||
unicast_peer {
|
||||
${concatStringsSep "\n" i.unicastPeers}
|
||||
}
|
||||
${optionalString (builtins.length i.unicastPeers > 0) ''
|
||||
unicast_peer {
|
||||
${concatStringsSep "\n" i.unicastPeers}
|
||||
}
|
||||
''}
|
||||
|
||||
virtual_ipaddress {
|
||||
${concatMapStringsSep "\n" virtualIpLine i.virtualIps}
|
||||
|
||||
Reference in New Issue
Block a user