diff options
author | W. Kosior <koszko@koszko.org> | 2025-03-21 09:50:55 +0100 |
---|---|---|
committer | W. Kosior <koszko@koszko.org> | 2025-05-26 14:07:29 +0200 |
commit | 6315fd97c890d7babf60b2bde1844f78b5c60d11 (patch) | |
tree | 841339eb58d3df12cdb0f217787740cf3d818405 | |
parent | 0ba7acf648e77b33150260d4e0e1db974a4447df (diff) | |
download | guix-6315fd97c890d7babf60b2bde1844f78b5c60d11.tar.gz guix-6315fd97c890d7babf60b2bde1844f78b5c60d11.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 ae54ba799c..162d103ee8 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -197,6 +197,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)) @@ -462,6 +470,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.") |