git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/nat: optional networking.nat.externalInterface (#41864)

to prevent "cannot coerce null to string" raise before the assertions are checked

commitd79a5057d3cad9f3bca569c39090e06114d75946 authorvolth <volth@webmaster.ms> dateTue 12 Jun 2018, 13:14 (8 years ago) parent91cda44
1 file changed+2−2
nixos/modules/services/networking/nat.nix+2−2
nixos/modules/services/networking/nat.nix+2−2
@@ -50,7 +50,7 @@ let
5050 # NAT from external ports to internal ports.
5151 ${concatMapStrings (fwd: ''
5252 iptables -w -t nat -A nixos-nat-pre \
53− -i ${cfg.externalInterface} -p ${fwd.proto} \
53+ -i ${toString cfg.externalInterface} -p ${fwd.proto} \
5454 --dport ${builtins.toString fwd.sourcePort} \
5555 -j DNAT --to-destination ${fwd.destination}
5656
@@ -81,7 +81,7 @@ let
8181
8282 ${optionalString (cfg.dmzHost != null) ''
8383 iptables -w -t nat -A nixos-nat-pre \
84− -i ${cfg.externalInterface} -j DNAT \
84+ -i ${toString cfg.externalInterface} -j DNAT \
8585 --to-destination ${cfg.dmzHost}
8686 ''}
8787