File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
modules/services/networking Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 2323 data-dir ${ cfg . dataDir }
2424
2525 ${ concatStringsSep "\n " ( mapAttrsToList ( ipv4 : ipv6 : "map " + ipv4 + " " + ipv6 ) cfg . mappings ) }
26+
27+ ${ optionalString ( ( builtins . length cfg . log ) > 0 ) ''
28+ log ${ concatStringsSep " " cfg . log }
29+ '' }
2630 '' ;
2731
2832 addrOpts =
132136 }
133137 '' ;
134138 } ;
139+
140+ log = mkOption {
141+ type = types . listOf types . str ;
142+ default = [ ] ;
143+ description = "Packet errors to log (drop, reject, icmp, self)" ;
144+ example = literalExpression ''
145+ [ "drop" "reject" "icmp" "self" ]
146+ '' ;
147+ } ;
135148 } ;
136149 } ;
137150
Original file line number Diff line number Diff line change 139139 mappings = {
140140 "192.0.2.42" = "2001:db8::2" ;
141141 } ;
142+ log = [
143+ "drop"
144+ "reject"
145+ "icmp"
146+ "self"
147+ ] ;
142148 } ;
143149 environment . systemPackages = [ pkgs . tcpdump ] ;
144150 } ;
205211 mappings = {
206212 "192.0.2.42" = "2001:db8::2" ;
207213 } ;
214+ log = [
215+ "drop"
216+ "reject"
217+ "icmp"
218+ "self"
219+ ] ;
208220 } ;
209221 environment . systemPackages = [ pkgs . tcpdump ] ;
210222 } ;
You can’t perform that action at this time.
0 commit comments