diff options
author | W. Kosior <koszko@koszko.org> | 2025-03-21 09:50:55 +0100 |
---|---|---|
committer | W. Kosior <koszko@koszko.org> | 2025-03-21 13:59:34 +0100 |
commit | 1774632a4b302473f619a199222ba66c752e40d3 (patch) | |
tree | 1b6eac8c07e6e21840aa782deb2a711c50d61d4c | |
parent | 49f2f0667bccf4fe224db5d51df513d7eaa0b922 (diff) | |
download | guix-1774632a4b302473f619a199222ba66c752e40d3.tar.gz guix-1774632a4b302473f619a199222ba66c752e40d3.zip |
services: openvpn: Allow configuring the `mssfix' option in client.
This is useful for clients in networks where UDP packet fragmentation doesn't
work.
* gnu/services/vpn.scm (maybe-mtu?): New variable.
(serialize-maybe-mtu): New variable.
(openvpn-client-configuration)[mssfix]: New field.
Change-Id: I8262a8ac8bda9ea76e7398ba421bba4437732ebe
-rw-r--r-- | gnu/services/vpn.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index e3e3313902..d69c429a1e 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -196,6 +196,14 @@ (format #t "resolv-retry infinite\n") #f)) +(define (maybe-mtu? value) + (or (not value) + (and (integer? value) + (> value 100)))) +(define (serialize-maybe-mtu field-name value) + (and value + (format #t "~a ~a~%" field-name value))) + (define pull-route? boolean?) (define (serialize-pull-route field-name value) (format #t "~:[route-nopull~%~;~]" value)) @@ -461,6 +469,10 @@ would be added to the store and readable by any user.") (openvpn-remote-list '()) "A list of remote servers to connect to.") + (mssfix + (maybe-mtu #f) + "The maximum packet size to exchange with the server.") + (pull-route? (pull-route #t) "Respect IP routing rules and DHCP options sent by the server.") |