)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"e0f737209eb50d17f4e38ea5137cb42d967c71af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"dcea3b65_91a60165","updated":"2024-12-12 12:33:51.000000000","message":"Breaks build on unsupported OS","commit_id":"524abb6f2789a9c4c151f9b8c716addc5cd51aab"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b20963858017b11f3e19789a75c152f8eae02d48","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"6a20c28f_bc71c50c","updated":"2025-01-10 16:54:58.000000000","message":"At the very least misses documentation for `--dns-script` option","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"10ba2d701dc42196bb789c3f400871e39012a193","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f89f13f1_66409832","updated":"2025-01-17 15:11:17.000000000","message":"We need to talk about the user experience.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"f6dd2c4d365da55b109333a9e76cde93acfef54f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"684dcfe5_4a7489cf","updated":"2025-03-03 16:44:14.000000000","message":"Still discussing some of my earlier complaints, but overall the default behavior looks good to me now.","commit_id":"696e38976c3854d204bab4eda68e613cc2c7a00d"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"e039424b_057075b2","updated":"2025-03-05 10:47:07.000000000","message":"You broke it","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"846d2b3562c7e867b71f3c0430a69ec1bebec1fd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"c776e04a_ea08926f","updated":"2025-03-06 12:41:26.000000000","message":"not all of my comments addressed, but works again","commit_id":"af2d3694b4920b03568c700e4a3a7e8bd9e970c0"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5de2a0b8_09897f34","updated":"2025-03-07 10:37:11.000000000","message":"Documentation still not quite right...","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"61744fbf415a63b8dec6ef05471403ee0d955bb0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"f373e88a_70a2543d","updated":"2025-03-19 14:41:16.000000000","message":"Overall it looks good, but I\u0027m afraid the change from ENABLE_DNS_SCRIPT to ENABLE_DNS_UPDOWN broke options.c","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"630f7f3922ac31b24a55e2f3337ac1b0e3ea9918","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":21,"id":"59a36722_ec933040","updated":"2025-04-16 13:58:26.000000000","message":"So, tested Gentoo and Debian.  Gentoo has \"no systemd\" and it seems \"no /sbin/resolvconf\" either, so the script does \"nothing, but return 1\" - see the comment there.\n\nI could see Gentoo being an oddball, but Debian testing does not work either - the resolv conf says `# Generated by NetworkManager` and there is no `systemd-resolved` or `/sbin/resolvectl` either.  I think this, at least, should work...  now need to find a system that is a) linux and b) is using one of these things...","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"bea7a9df5fa33a09fa6d12a8f9440928ff2b5b43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"b1b67d8b_1c592c00","updated":"2025-04-16 12:53:18.000000000","message":"Working my way through it, first findings\n\n```\n2025-04-16 14:44:56 /usr/local/libexec/openvpn/dns-updown\n2025-04-16 14:44:56 dns up command exited with status 127\n```\n\nso if trying to test this from a build environment, without it being installed ever before, it will not work, with a non very helpful error message (\"this file does not exist\").\n\nThen, trying to run from build directory\n\n```\nSU .. openvpn ... --dns-updown ../distro/dns-scripts/dns-updown\nOptions error: --dns-updown script fails with \u0027../distro/dns-scripts/dns-updown\u0027: Permission denied (errno\u003d13)\nOptions error: Please correct this error.\n```\n\ndoes not work because (as I feared) this is built with no x-bit\n\n```\ngert@gentoo ~/t_server.git/tests $ ls -l ../distro/dns-scripts/dns-updown\n-rw-r--r-- 1 gert gert 5324 Apr 16 05:30 ../distro/dns-scripts/dns-updown\n```\n\ncan we get this in place with an x bit?  (I could add a precondition to t_client.rc but this would really be modifying the build results on \"make check\" which is not something I want)","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"e4b8bc5c7ca4d4359fa41167d88d99509cd9c734","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"84852b25_43cd1661","in_reply_to":"59a36722_ec933040","updated":"2025-04-28 06:12:05.000000000","message":"Okay, I think Debian Trixie had a little resolved rage-quit for a short time, but it seems to be back now. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug\u003d1098914\n\nWith that out of the way a final fallback to direct resolv.conf manipulation is the appropriate thing to do.","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"08eceaf55cba82586f77c79452e3821cbc77d82a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"07912707_5b171d85","updated":"2025-05-02 17:13:48.000000000","message":"So, tested on FreeBSD, script works.  Great :-)\nTested on Gentoo/resolv.conf file (does not work), and on the \"debian testing\" box (now claims to \"setting DNS using resolv.conf file\") but it does not work either - same effect as on Gentoo, I end up with an empty `nameserver \u003cnothing\u003e` line (see copy-paste in the systemd-dns-updown.sh hunk)\nTested on OpenBSD/resolv.conf file (does not work, different error) (see there).\n\nAlso, it does not do anything for incoming pushed DHCP_OPTION DNS - depending on client UV_WANT_DNS I push DHCP-Options that are properly reflected to an ``--up`` script, but the `--dns-updown` script is not run at all.  This is not how I understand what it should do - is this fixed in a later patch in the series?","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"75794f4ac75ca8ecc32ece72210bc364468b041c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"e76642ea_5d0adb08","in_reply_to":"07912707_5b171d85","updated":"2025-05-13 09:44:32.000000000","message":"What about incoming dhcp-options?  These still do not make it into a `--dns-updown` call - having that fixed in a later patch in the series is fine, but I need to know what the intention is, to move ahead.","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"dd4ae9968250ad883a413cd0c48c27afc4e874d1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"3fdc1ece_66b18f63","in_reply_to":"e76642ea_5d0adb08","updated":"2025-05-13 17:13:04.000000000","message":"Clarified that on IRC: internal \"decoupling of what-goes-in from what-goes-out\" happens in gerrit#904.","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"75794f4ac75ca8ecc32ece72210bc364468b041c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":23,"id":"442f1891_ac53f4f4","updated":"2025-05-13 09:44:32.000000000","message":"Getting closer - Gentoo (\"resolv.conf\") works now, OpenBSD breaks in more exciting ways, and I need an answer on the plan for dhcp-option handling.","commit_id":"cc469a07db40c47ebdb9b2852cae6087784908b5"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"dd4ae9968250ad883a413cd0c48c27afc4e874d1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"4ad997ec_055ae632","updated":"2025-05-13 17:13:04.000000000","message":"getting really close :-) - OpenBSD and OpenSolaris tested, both *work*, but have the annoying habit of leaving an extra blank line at the top of the restored resolv.conf (accumulating).  So one `\\n` needs to go.","commit_id":"bb1905c9059de5bac009b022a520285f0813e7ee"}],"CMakeLists.txt":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b20963858017b11f3e19789a75c152f8eae02d48","unresolved":true,"context_lines":[{"line_number":40,"context_line":"option(ENABLE_PKCS11 \"BUILD with pkcs11-helper\" ON)"},{"line_number":41,"context_line":"option(USE_WERROR \"Treat compiler warnings as errors (-Werror)\" ON)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"set(DNS_UPDOWN_PATH \"/usr/libexec/openvpn/dns-updown\" CACHE STRING \"Default location for the DNS up/down script\")"},{"line_number":44,"context_line":"set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH \"Location of the plugin directory\")"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# Create machine readable compile commands"}],"source_content_type":"text/x-cmake","patch_set":6,"id":"ff64760d_e60a785e","line":43,"updated":"2025-01-10 16:54:58.000000000","message":"We should either set both of these to use /usr/local by default or none. Probably best to just use `${CMAKE_INSTALL_PREFIX}`","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"da7b9b4613ba542d4d7a10e2b1785cdf0cd0ccf4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"option(ENABLE_PKCS11 \"BUILD with pkcs11-helper\" ON)"},{"line_number":41,"context_line":"option(USE_WERROR \"Treat compiler warnings as errors (-Werror)\" ON)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"set(DNS_UPDOWN_PATH \"/usr/libexec/openvpn/dns-updown\" CACHE STRING \"Default location for the DNS up/down script\")"},{"line_number":44,"context_line":"set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH \"Location of the plugin directory\")"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# Create machine readable compile commands"}],"source_content_type":"text/x-cmake","patch_set":6,"id":"d92c7103_6b9f85f3","line":43,"in_reply_to":"ff64760d_e60a785e","updated":"2025-01-13 12:13:21.000000000","message":"Done","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"61744fbf415a63b8dec6ef05471403ee0d955bb0","unresolved":true,"context_lines":[{"line_number":579,"context_line":"add_library_deps(openvpn)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"target_compile_options(openvpn PRIVATE -DDNS_UPDOWN_PATH\u003d\\\"${DNS_UPDOWN_PATH}\\\")"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"if(MINGW)"},{"line_number":584,"context_line":"    target_compile_options(openvpn PRIVATE -municode -UUNICODE)"},{"line_number":585,"context_line":"    target_link_options(openvpn PRIVATE -municode)"}],"source_content_type":"text/x-cmake","patch_set":15,"id":"4b69602a_38fa67d4","line":582,"updated":"2025-03-19 14:41:16.000000000","message":"does this need some sort of magic to enable `-DENABLE_DNS_UPDOWN`?","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"038b21de10ce85f3fb6d7b48b0d9ab3942f92f00","unresolved":false,"context_lines":[{"line_number":579,"context_line":"add_library_deps(openvpn)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"target_compile_options(openvpn PRIVATE -DDNS_UPDOWN_PATH\u003d\\\"${DNS_UPDOWN_PATH}\\\")"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"if(MINGW)"},{"line_number":584,"context_line":"    target_compile_options(openvpn PRIVATE -municode -UUNICODE)"},{"line_number":585,"context_line":"    target_link_options(openvpn PRIVATE -municode)"}],"source_content_type":"text/x-cmake","patch_set":15,"id":"910abd7f_01e28036","line":582,"in_reply_to":"46a4965c_d67b6a1d","updated":"2025-04-05 04:12:29.000000000","message":"Done","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"c33224aab79ef5d40f42e2f67adf0bd3ee40fd7e","unresolved":true,"context_lines":[{"line_number":579,"context_line":"add_library_deps(openvpn)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"target_compile_options(openvpn PRIVATE -DDNS_UPDOWN_PATH\u003d\\\"${DNS_UPDOWN_PATH}\\\")"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"if(MINGW)"},{"line_number":584,"context_line":"    target_compile_options(openvpn PRIVATE -municode -UUNICODE)"},{"line_number":585,"context_line":"    target_link_options(openvpn PRIVATE -municode)"}],"source_content_type":"text/x-cmake","patch_set":15,"id":"46a4965c_d67b6a1d","line":582,"in_reply_to":"4b69602a_38fa67d4","updated":"2025-03-19 22:45:28.000000000","message":"Now you can disable the feature with ccmake or `-DENABLE_DNS_UPDOWN\u003dON`, just like the others.","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"}],"configure.ac":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1d322d9497b11ceeeadc8a0ec4f9a99025d47983","unresolved":true,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"AC_ARG_ENABLE("},{"line_number":99,"context_line":"\t[dns-updown],"},{"line_number":100,"context_line":"\t[AS_HELP_STRING([--disable-dns-updown], [disable the --dns-updown hook @\u003c:@default\u003dno@:\u003e@])],"},{"line_number":101,"context_line":"\t,"},{"line_number":102,"context_line":"\t[enable_dns_updown\u003d\"yes\"]"},{"line_number":103,"context_line":")"}],"source_content_type":"application/octet-stream","patch_set":16,"id":"bc5520b7_21f8d291","line":100,"updated":"2025-03-20 11:43:13.000000000","message":"This is now inconsistent with how our options are described. `default\u003dyes` would be consistent.","commit_id":"267d00e3e8dbea63e8b4177d0aaf7760076609db"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"f9bd08a2c29996e535db842c17301b2f5829b088","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"AC_ARG_ENABLE("},{"line_number":99,"context_line":"\t[dns-updown],"},{"line_number":100,"context_line":"\t[AS_HELP_STRING([--disable-dns-updown], [disable the --dns-updown hook @\u003c:@default\u003dno@:\u003e@])],"},{"line_number":101,"context_line":"\t,"},{"line_number":102,"context_line":"\t[enable_dns_updown\u003d\"yes\"]"},{"line_number":103,"context_line":")"}],"source_content_type":"application/octet-stream","patch_set":16,"id":"52a50795_cfc20080","line":100,"in_reply_to":"bc5520b7_21f8d291","updated":"2025-03-31 16:29:50.000000000","message":"Done","commit_id":"267d00e3e8dbea63e8b4177d0aaf7760076609db"}],"distro/dns-scripts/Makefile.am":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"630f7f3922ac31b24a55e2f3337ac1b0e3ea9918","unresolved":true,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"dns-updown: @DNS_UPDOWN_TYPE@-dns-updown.sh"},{"line_number":26,"context_line":"\tcp ${srcdir}/@DNS_UPDOWN_TYPE@-dns-updown.sh $@"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"all: $(script_SCRIPTS)"}],"source_content_type":"application/octet-stream","patch_set":21,"id":"4845ab0a_21384a93","line":27,"updated":"2025-04-16 13:58:26.000000000","message":"can we `chmod +x` this here?  Then it could be run from `t_client.rc` to test \"what we made for this particular OS\" without having to modify/copy around that file.","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"e4b8bc5c7ca4d4359fa41167d88d99509cd9c734","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"dns-updown: @DNS_UPDOWN_TYPE@-dns-updown.sh"},{"line_number":26,"context_line":"\tcp ${srcdir}/@DNS_UPDOWN_TYPE@-dns-updown.sh $@"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"all: $(script_SCRIPTS)"}],"source_content_type":"application/octet-stream","patch_set":21,"id":"62e0d181_77af43a2","line":27,"in_reply_to":"4845ab0a_21384a93","updated":"2025-04-28 06:12:05.000000000","message":"Done","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"}],"distro/dns-scripts/resolvconf_file-dns-updown.sh":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"08eceaf55cba82586f77c79452e3821cbc77d82a","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"a6af4a0f_484144cd","line":85,"updated":"2025-05-02 17:13:48.000000000","message":"so, tested this on OpenBSD (7.6) and it does not work\n\nIncoming push info as on Linux (`,dns server 1 address 10.194.0.1,dns server 1 address fd00:abcd:194::1,dns server 2 resolve-domains open.vpn,dns server 2 address 10.194.1.1,dns server 2 address fd00:abcd:194:1::1`) and the script dies with\n\n```\n2025-05-02 18:54:28 distro/dns-scripts/dns-updown\nsed: 1: \"1i### openvpn tun1 begi ...: command i expects \\ followed by text\n2025-05-02 18:54:28 dns up command exited with status 1\n```\n\nand nothing gets changed.","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"25955c15b9259bd35ca81ca90c76d9d8e891cda7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"724c6b91_a56d4f67","line":85,"in_reply_to":"438f64f9_6cfc18d5","updated":"2025-05-14 13:49:29.000000000","message":"Done","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"75794f4ac75ca8ecc32ece72210bc364468b041c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"df4e47af_a1042fd9","line":85,"in_reply_to":"948cdd9f_9105dc75","updated":"2025-05-13 09:44:32.000000000","message":"Still does not work, but it\u0027s way more interesting now.\n\nWhile OpenVPN runs\n\n```\nobsd75$ cat /etc/resolv.conf\n### openvpn tun1 begin ###nnameserver 10.194.0.1nnameserver fd00:abcd:194::1n### openvpn tun1 end ###nlookup file bind\nnameserver 195.30.0.2\nnameserver 195.30.0.1\nnameserver 2001:608::2 \n```\nwhich hints at shell/echo/\"\\n\" madness...\n\nAfter OpenVPN finishes, it \"cleans up\":\n``\nobsd75$ cat /etc/resolv.conf\nobsd75$ `\n```\n\n(this is on OpenBSD 7.6, the naming/prompt is a bit stale)","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"9add3b8e5ad77be7241a35ff11ebdd2cc8d00d0d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"948cdd9f_9105dc75","line":85,"in_reply_to":"a6af4a0f_484144cd","updated":"2025-05-10 12:20:13.000000000","message":"Done","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"dd4ae9968250ad883a413cd0c48c27afc4e874d1","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"438f64f9_6cfc18d5","line":85,"in_reply_to":"df4e47af_a1042fd9","updated":"2025-05-13 17:13:04.000000000","message":"We are getting very close... but... the concatenation part \"new text plus existing config\" is adding a newline, which leads to the resulting file growing an extra newline for each openvpn call\n\n```\nobsd75$ cat /etc/resolv.conf\n### openvpn tun1 begin ###\nnameserver 10.194.0.1\nnameserver fd00:abcd:194::1\n### openvpn tun1 end ###\n\n\nlookup file bind\nnameserver 195.30.0.2\nnameserver 195.30.0.1\nnameserver 2001:608::2 \n```\n\n... this file started out with no empty lines...","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"}],"distro/dns-scripts/systemd-dns-updown.sh":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"bf00252618f89fec747c74d264b745267a36fcba","unresolved":true,"context_lines":[{"line_number":12,"context_line":"#   * systemd-resolved"},{"line_number":13,"context_line":"#   * resolvconf"},{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"# Example env from openvpn (not all are always applied):"},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"#   dns_search_domain_1 mycorp.in"},{"line_number":18,"context_line":"#   dns_search_domain_2 eu.mycorp.com"}],"source_content_type":"text/x-sh","patch_set":6,"id":"2f129ac9_1e6e34f1","line":15,"updated":"2025-01-10 17:25:20.000000000","message":"Example should mention dev, script-type, and dns-vars-file (comment applies to all variants of the script).","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"da7b9b4613ba542d4d7a10e2b1785cdf0cd0ccf4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#   * systemd-resolved"},{"line_number":13,"context_line":"#   * resolvconf"},{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"# Example env from openvpn (not all are always applied):"},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"#   dns_search_domain_1 mycorp.in"},{"line_number":18,"context_line":"#   dns_search_domain_2 eu.mycorp.com"}],"source_content_type":"text/x-sh","patch_set":6,"id":"48e4933f_e0619590","line":15,"in_reply_to":"2f129ac9_1e6e34f1","updated":"2025-01-13 12:13:21.000000000","message":"Done","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"bf00252618f89fec747c74d264b745267a36fcba","unresolved":true,"context_lines":[{"line_number":27,"context_line":"#   dns_server_1_sni dns.mycorp.in"},{"line_number":28,"context_line":"#"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"[ -z \"${dns_vars_file}\" ] || . \"${dns_vars_file}\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"function do_resolved_servers {"},{"line_number":33,"context_line":"    local sni\u003d\"\""}],"source_content_type":"text/x-sh","patch_set":6,"id":"68692646_1b746e29","line":30,"updated":"2025-01-10 17:25:20.000000000","message":"dns_vars_file is not actually used until the next commit, should this line be moved to there? (comment applies to all variants of the script).","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"da7b9b4613ba542d4d7a10e2b1785cdf0cd0ccf4","unresolved":false,"context_lines":[{"line_number":27,"context_line":"#   dns_server_1_sni dns.mycorp.in"},{"line_number":28,"context_line":"#"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"[ -z \"${dns_vars_file}\" ] || . \"${dns_vars_file}\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"function do_resolved_servers {"},{"line_number":33,"context_line":"    local sni\u003d\"\""}],"source_content_type":"text/x-sh","patch_set":6,"id":"a4477d67_d3d4d1c6","line":30,"in_reply_to":"68692646_1b746e29","updated":"2025-01-13 12:13:21.000000000","message":"Done","commit_id":"112bc1a827ff3f212b8c88663d2118e3eb2d9398"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"10ba2d701dc42196bb789c3f400871e39012a193","unresolved":true,"context_lines":[{"line_number":88,"context_line":"}"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"function do_resolved {"},{"line_number":91,"context_line":"    [[ \"$(readlink /etc/resolv.conf)\" \u003d~ systemd ]] || return 1"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if [ \"$script_type\" \u003d \"dns-up\" ]; then"},{"line_number":94,"context_line":"        do_resolved_servers"}],"source_content_type":"text/x-sh","patch_set":7,"id":"2ff31b19_51522721","line":91,"updated":"2025-01-17 15:11:17.000000000","message":"This fallback is nice, but I really would like to see some kind of message about it in the log.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"8cf737aee3db4edbab77eaafdbfa86379037580d","unresolved":true,"context_lines":[{"line_number":88,"context_line":"}"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"function do_resolved {"},{"line_number":91,"context_line":"    [[ \"$(readlink /etc/resolv.conf)\" \u003d~ systemd ]] || return 1"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if [ \"$script_type\" \u003d \"dns-up\" ]; then"},{"line_number":94,"context_line":"        do_resolved_servers"}],"source_content_type":"text/x-sh","patch_set":7,"id":"e7242d2e_9ce75db6","line":91,"in_reply_to":"2ff31b19_51522721","updated":"2025-02-27 00:29:40.000000000","message":"Problem is that scripts can\u0027t log anything afaik.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"24e62895eae9cc9892f5378c69675b0b2ea6d723","unresolved":true,"context_lines":[{"line_number":88,"context_line":"}"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"function do_resolved {"},{"line_number":91,"context_line":"    [[ \"$(readlink /etc/resolv.conf)\" \u003d~ systemd ]] || return 1"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if [ \"$script_type\" \u003d \"dns-up\" ]; then"},{"line_number":94,"context_line":"        do_resolved_servers"}],"source_content_type":"text/x-sh","patch_set":7,"id":"c917f1cc_c2cd0b8b","line":91,"in_reply_to":"c52dbf8e_3ccb81e6","updated":"2025-03-03 17:23:25.000000000","message":"In that case, yeah. Will add a log line for the actual way DNS is set when I update the scripts to select the best --dns server","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":false,"context_lines":[{"line_number":88,"context_line":"}"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"function do_resolved {"},{"line_number":91,"context_line":"    [[ \"$(readlink /etc/resolv.conf)\" \u003d~ systemd ]] || return 1"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if [ \"$script_type\" \u003d \"dns-up\" ]; then"},{"line_number":94,"context_line":"        do_resolved_servers"}],"source_content_type":"text/x-sh","patch_set":7,"id":"57d1206f_56136b77","line":91,"in_reply_to":"c917f1cc_c2cd0b8b","updated":"2025-03-05 10:47:07.000000000","message":"Done","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"f6dd2c4d365da55b109333a9e76cde93acfef54f","unresolved":true,"context_lines":[{"line_number":88,"context_line":"}"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"function do_resolved {"},{"line_number":91,"context_line":"    [[ \"$(readlink /etc/resolv.conf)\" \u003d~ systemd ]] || return 1"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if [ \"$script_type\" \u003d \"dns-up\" ]; then"},{"line_number":94,"context_line":"        do_resolved_servers"}],"source_content_type":"text/x-sh","patch_set":7,"id":"c52dbf8e_3ccb81e6","line":91,"in_reply_to":"e7242d2e_9ce75db6","updated":"2025-03-03 16:44:14.000000000","message":"Not sure what you mean. You can just \"echo\" in scripts and the output will appear in the log.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":true,"context_lines":[{"line_number":72,"context_line":"        while :; do"},{"line_number":73,"context_line":"            domain_var\u003ddns_server_${n}_resolve_domain_${i}"},{"line_number":74,"context_line":"            [ -n \"${!domain_var}\" ] || break"},{"line_number":75,"context_line":"            [[ \"$list\" \u003d~ (^| )\"${!domain_var}\"( |$) ]] \u0026\u0026 continue"},{"line_number":76,"context_line":"            list+\u003d\"~${!domain_var} \""},{"line_number":77,"context_line":"            i\u003d$((i+1))"},{"line_number":78,"context_line":"        done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"4b946c0f_aa2c619b","line":75,"range":{"start_line":75,"start_character":15,"end_line":75,"end_character":17},"updated":"2025-03-05 10:47:07.000000000","message":"Maybe we could add a comment here like: \"Add as a routing-only domain (~ prefix) unless already configured as a search domain\". Sure, this is documented in systemd documentation, but unless you\u0027re intimately familiar with that this code just looks like gibberish.","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":true,"context_lines":[{"line_number":72,"context_line":"        while :; do"},{"line_number":73,"context_line":"            domain_var\u003ddns_server_${n}_resolve_domain_${i}"},{"line_number":74,"context_line":"            [ -n \"${!domain_var}\" ] || break"},{"line_number":75,"context_line":"            [[ \"$list\" \u003d~ (^| )\"${!domain_var}\"( |$) ]] \u0026\u0026 continue"},{"line_number":76,"context_line":"            list+\u003d\"~${!domain_var} \""},{"line_number":77,"context_line":"            i\u003d$((i+1))"},{"line_number":78,"context_line":"        done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"80d52a50_87e35eb1","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":25},"updated":"2025-03-05 10:47:07.000000000","message":"This broken now. If this matches it does continue but it does not increase \"i\" so it is an endless loop.","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"7098a617c655f5b414043b79382a65dae5377f51","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        while :; do"},{"line_number":73,"context_line":"            domain_var\u003ddns_server_${n}_resolve_domain_${i}"},{"line_number":74,"context_line":"            [ -n \"${!domain_var}\" ] || break"},{"line_number":75,"context_line":"            [[ \"$list\" \u003d~ (^| )\"${!domain_var}\"( |$) ]] \u0026\u0026 continue"},{"line_number":76,"context_line":"            list+\u003d\"~${!domain_var} \""},{"line_number":77,"context_line":"            i\u003d$((i+1))"},{"line_number":78,"context_line":"        done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"9f07bc79_ffc94f9f","line":75,"range":{"start_line":75,"start_character":15,"end_line":75,"end_character":17},"in_reply_to":"4b946c0f_aa2c619b","updated":"2025-03-06 12:56:53.000000000","message":"Acknowledged","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"846d2b3562c7e867b71f3c0430a69ec1bebec1fd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        while :; do"},{"line_number":73,"context_line":"            domain_var\u003ddns_server_${n}_resolve_domain_${i}"},{"line_number":74,"context_line":"            [ -n \"${!domain_var}\" ] || break"},{"line_number":75,"context_line":"            [[ \"$list\" \u003d~ (^| )\"${!domain_var}\"( |$) ]] \u0026\u0026 continue"},{"line_number":76,"context_line":"            list+\u003d\"~${!domain_var} \""},{"line_number":77,"context_line":"            i\u003d$((i+1))"},{"line_number":78,"context_line":"        done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"b6e04719_5c31cad2","line":75,"range":{"start_line":75,"start_character":15,"end_line":75,"end_character":17},"in_reply_to":"4b946c0f_aa2c619b","updated":"2025-03-06 12:41:26.000000000","message":"Done","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"846d2b3562c7e867b71f3c0430a69ec1bebec1fd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        while :; do"},{"line_number":73,"context_line":"            domain_var\u003ddns_server_${n}_resolve_domain_${i}"},{"line_number":74,"context_line":"            [ -n \"${!domain_var}\" ] || break"},{"line_number":75,"context_line":"            [[ \"$list\" \u003d~ (^| )\"${!domain_var}\"( |$) ]] \u0026\u0026 continue"},{"line_number":76,"context_line":"            list+\u003d\"~${!domain_var} \""},{"line_number":77,"context_line":"            i\u003d$((i+1))"},{"line_number":78,"context_line":"        done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"00a046e5_14744958","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":25},"in_reply_to":"80d52a50_87e35eb1","updated":"2025-03-06 12:41:26.000000000","message":"Done","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"7098a617c655f5b414043b79382a65dae5377f51","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        while :; do"},{"line_number":73,"context_line":"            domain_var\u003ddns_server_${n}_resolve_domain_${i}"},{"line_number":74,"context_line":"            [ -n \"${!domain_var}\" ] || break"},{"line_number":75,"context_line":"            [[ \"$list\" \u003d~ (^| )\"${!domain_var}\"( |$) ]] \u0026\u0026 continue"},{"line_number":76,"context_line":"            list+\u003d\"~${!domain_var} \""},{"line_number":77,"context_line":"            i\u003d$((i+1))"},{"line_number":78,"context_line":"        done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"48ccf623_85a0324a","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":25},"in_reply_to":"80d52a50_87e35eb1","updated":"2025-03-06 12:56:53.000000000","message":"Good catch","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":true,"context_lines":[{"line_number":113,"context_line":"        }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        local transport_var\u003ddns_server_${n}_transport"},{"line_number":116,"context_line":"        [ -n \"${!transport_var}\" -a \"${!transport_var}\" \u003d \"DoH\" ] || break"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        n\u003d$((n+1))"},{"line_number":119,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"1795ad88_bac2fb33","line":116,"updated":"2025-03-05 10:47:07.000000000","message":"I think this line could use a comment like \"skip DoH dns entries\", otherwise it takes a while to understand what this does.","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"7098a617c655f5b414043b79382a65dae5377f51","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        local transport_var\u003ddns_server_${n}_transport"},{"line_number":116,"context_line":"        [ -n \"${!transport_var}\" -a \"${!transport_var}\" \u003d \"DoH\" ] || break"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        n\u003d$((n+1))"},{"line_number":119,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"172c246a_ae95ab11","line":116,"in_reply_to":"1795ad88_bac2fb33","updated":"2025-03-06 12:56:53.000000000","message":"Done","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"846d2b3562c7e867b71f3c0430a69ec1bebec1fd","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        local transport_var\u003ddns_server_${n}_transport"},{"line_number":116,"context_line":"        [ -n \"${!transport_var}\" -a \"${!transport_var}\" \u003d \"DoH\" ] || break"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        n\u003d$((n+1))"},{"line_number":119,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":9,"id":"97e01f52_40b91b62","line":116,"in_reply_to":"1795ad88_bac2fb33","updated":"2025-03-06 12:41:26.000000000","message":"Done","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"630f7f3922ac31b24a55e2f3337ac1b0e3ea9918","unresolved":true,"context_lines":[{"line_number":191,"context_line":"    return 0"},{"line_number":192,"context_line":"}"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"do_resolved || do_resolvconf"}],"source_content_type":"text/x-sh","patch_set":21,"id":"a3512cba_41c3b0c0","line":194,"updated":"2025-04-16 13:58:26.000000000","message":"On a system that has neither systemd nor `/sbin/resolvconf`  (namely my gentoo system here), this will do nothing but \"exit 1\", and the caller will log\n\n```\n2025-04-16 15:01:20 us\u003d547785 ../distro/dns-scripts/dns-updown\n2025-04-16 15:01:20 us\u003d551358 dns up command exited with status 1\n```\n\nwhich is not that helpful in figuring out what\u0027s going on.  Maybe print some diagnostics from the scripts if things can not be done due to \"your system is too old fashioned, go away\"?","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"e4b8bc5c7ca4d4359fa41167d88d99509cd9c734","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    return 0"},{"line_number":192,"context_line":"}"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"do_resolved || do_resolvconf"}],"source_content_type":"text/x-sh","patch_set":21,"id":"50dccc8f_5ae0d38a","line":194,"in_reply_to":"a3512cba_41c3b0c0","updated":"2025-04-28 06:12:05.000000000","message":"Done","commit_id":"68cf2e00e74282b7b0c17ae3bf4344110832aa6d"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"08eceaf55cba82586f77c79452e3821cbc77d82a","unresolved":true,"context_lines":[{"line_number":228,"context_line":"    fi"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    return 0"},{"line_number":231,"context_line":"}"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"do_resolved || do_resolvconf || do_resolv_conf_file || {"},{"line_number":234,"context_line":"    echo \"setting DNS failed, no method succeeded\""}],"source_content_type":"text/x-sh","patch_set":22,"id":"9a1615d4_fd1db246","line":231,"updated":"2025-05-02 17:13:48.000000000","message":"this looks like it should work, but it doesn\u0027t behave for me... Gentoo, again, with pushed `--dns` settings, and the resulting resolv.conf looks like this:\n\n```\n### openvpn tun8 begin ###\nnameserver \n### openvpn tun8 end ###\n# Generated by netifrc for interface enp2s1\ndomain ov.greenie.net\nnameserver 2001:608::2\nnameserver 195.30.0.1\nnameserver 195.30.0.2\n```\n\nthe client invocation is like this (with the reference server that pushes --dns or --dhcp-option dns, depending on UV_WANT_DNS):\n\n```\nopenvpn --client --ca /home/gert/t_client_keys/ca.crt      --cert /home/gert/t_client_keys/cron2-gentoo.ov-amd64.crt --key /home/gert/t_client_keys/cron2-gentoo.ov-amd64.key      --remote-cert-tls server --nobind --comp-lzo --verb 3         --tls-cert-profile insecure --dev tun --proto udp6 --remote conn-test-server.openvpn.org --port 51194 --push-peer-info --setenv UV_WANT_DNS dns --dns-updown ./distro/dns-scripts/dns-updown --script-security 2\n```\n\nand the server pushes\n```\ndns server 1 resolve-domains open.vpn,dns server 1 address 10.194.0.1,dns server 1 address fd00:abcd:194::1,dns server 2 resolve-domains open.vpn,dns server 2 address 10.194.1.1,dns server 2 address fd00:abcd:194:1::1\n```\n\nclient logs\n```\n2025-05-02 18:42:38 distro/dns-scripts/dns-updown\nsetting DNS using resolv.conf file\n2025-05-02 18:42:38 dns up command exited with status 0\n```","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"75794f4ac75ca8ecc32ece72210bc364468b041c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    fi"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    return 0"},{"line_number":231,"context_line":"}"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"do_resolved || do_resolvconf || do_resolv_conf_file || {"},{"line_number":234,"context_line":"    echo \"setting DNS failed, no method succeeded\""}],"source_content_type":"text/x-sh","patch_set":22,"id":"d260ed1a_af935874","line":231,"in_reply_to":"55f8a886_64c84996","updated":"2025-05-13 09:44:32.000000000","message":"This works now!\n\n```\ngert@gentoo ~ $ cat /etc/resolv.conf\n### openvpn tun8 begin ###\nnameserver 10.194.0.1\nnameserver fd00:abcd:194::1\n### openvpn tun8 end ###\n# Generated by netifrc for interface enp2s1\ndomain ov.greenie.net\nnameserver 2001:608::2\nnameserver 195.30.0.1\nnameserver 195.30.0.2\n```","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"9add3b8e5ad77be7241a35ff11ebdd2cc8d00d0d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    fi"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    return 0"},{"line_number":231,"context_line":"}"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"do_resolved || do_resolvconf || do_resolv_conf_file || {"},{"line_number":234,"context_line":"    echo \"setting DNS failed, no method succeeded\""}],"source_content_type":"text/x-sh","patch_set":22,"id":"55f8a886_64c84996","line":231,"in_reply_to":"9a1615d4_fd1db246","updated":"2025-05-10 12:20:13.000000000","message":"Done","commit_id":"334ffcd63b99e261f42d6da7e983c9d473cb63d2"}],"doc/man-sections/script-options.rst":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":true,"context_lines":[{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there. Also note that no DNS related"},{"line_number":257,"context_line":"  ``--dhcp-option`` will cause this hook to run. Instead foreign_option"},{"line_number":258,"context_line":"  environment values will be passed to ``--up`` and ``--down`` if no ``--dns``"},{"line_number":259,"context_line":"  option causes the old behavior to be overridden."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"--down cmd"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ebb56b30_2366159f","line":258,"updated":"2025-03-05 10:47:07.000000000","message":"This sentence is too complicated. After reading it I\u0027m now more confused than before how --dhcp-option and --dns interact.","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"f1df890779d0f6129afc26bc3243403767ab91ad","unresolved":false,"context_lines":[{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there. Also note that no DNS related"},{"line_number":257,"context_line":"  ``--dhcp-option`` will cause this hook to run. Instead foreign_option"},{"line_number":258,"context_line":"  environment values will be passed to ``--up`` and ``--down`` if no ``--dns``"},{"line_number":259,"context_line":"  option causes the old behavior to be overridden."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"--down cmd"}],"source_content_type":"text/x-rst","patch_set":9,"id":"d02b3e61_ee1441fd","line":258,"in_reply_to":"4e38da14_521dd7d8","updated":"2025-03-06 22:14:59.000000000","message":"Done","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b36e94b68e419fdd8642b675cb47ee117d05d22b","unresolved":true,"context_lines":[{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there. Also note that no DNS related"},{"line_number":257,"context_line":"  ``--dhcp-option`` will cause this hook to run. Instead foreign_option"},{"line_number":258,"context_line":"  environment values will be passed to ``--up`` and ``--down`` if no ``--dns``"},{"line_number":259,"context_line":"  option causes the old behavior to be overridden."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"--down cmd"}],"source_content_type":"text/x-rst","patch_set":9,"id":"4e38da14_521dd7d8","line":258,"in_reply_to":"846a7522_b67378b2","updated":"2025-03-06 13:22:05.000000000","message":"Okay, first of all start a new paragraph after \"service there.\" The Windows topic should have its own paragraph.\n\nReformulate the rest to something like:\nNote that DNS-related `--dhcp-option` options will not be handled by this hook. If any `--dns\u0027 option is present then DNS-related `--dhcp-option` will be ignored. Otherwise it will be given as `foreign_option` environment variable to `--up` and `--down` as in previous versions of OpenVPN.\n\nNot 100% sure this describes the correct behavior, but you can adapt it to do so. But the structure is much better to understand what is going on, IMHO. The \"if no `--dns` option causes the old behavior to be overridden\" is very cryptic, I think.","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"5c75a39d1bc67ece13ce9786f03fc2a9421b2f16","unresolved":false,"context_lines":[{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there. Also note that no DNS related"},{"line_number":257,"context_line":"  ``--dhcp-option`` will cause this hook to run. Instead foreign_option"},{"line_number":258,"context_line":"  environment values will be passed to ``--up`` and ``--down`` if no ``--dns``"},{"line_number":259,"context_line":"  option causes the old behavior to be overridden."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"--down cmd"}],"source_content_type":"text/x-rst","patch_set":9,"id":"846a7522_b67378b2","line":258,"in_reply_to":"ebb56b30_2366159f","updated":"2025-03-06 12:59:38.000000000","message":"Hm, what exactly needs clarification?","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":true,"context_lines":[{"line_number":243,"context_line":"  The ``--client-disconnect`` command is not passed any extra arguments"},{"line_number":244,"context_line":"  (only those arguments specified in cmd, if any)."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"--dns-script cmd | disable"},{"line_number":247,"context_line":"  Run command ``cmd``, instead of the default DNS command that comes with"},{"line_number":248,"context_line":"  openvpn. If ``cmd`` is ``disable`` no command is executed to set ``--dns``"},{"line_number":249,"context_line":"  options. If you write your own command, please make sure to ignore ``--dns``"}],"source_content_type":"text/x-rst","patch_set":12,"id":"a70abe1d_54f8b426","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":12},"updated":"2025-03-07 10:37:11.000000000","message":"No, this doesn\u0027t work. rst is very specific here, only one argument is allowed. Which is why we do the weird \"args\" \"Valid syntaxes\" dance for many options. I specifically only asked you to put the `| disable` in the usage text, not here.","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"30bb53a9cb755d0a0a31a661f43e36aa786f743e","unresolved":false,"context_lines":[{"line_number":243,"context_line":"  The ``--client-disconnect`` command is not passed any extra arguments"},{"line_number":244,"context_line":"  (only those arguments specified in cmd, if any)."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"--dns-script cmd | disable"},{"line_number":247,"context_line":"  Run command ``cmd``, instead of the default DNS command that comes with"},{"line_number":248,"context_line":"  openvpn. If ``cmd`` is ``disable`` no command is executed to set ``--dns``"},{"line_number":249,"context_line":"  options. If you write your own command, please make sure to ignore ``--dns``"}],"source_content_type":"text/x-rst","patch_set":12,"id":"b108ebbe_96e2212b","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":12},"in_reply_to":"a70abe1d_54f8b426","updated":"2025-03-12 04:05:16.000000000","message":"Right, even escaping the | doesn\u0027t do any good.","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":true,"context_lines":[{"line_number":250,"context_line":"  server profiles that cannot be applied. Port, DNSSEC and secure transport"},{"line_number":251,"context_line":"  settings need to be adhered to. If split DNS is not possible a full redirect"},{"line_number":252,"context_line":"  can be used as a fallback. If not all of the server addresses or search domains"},{"line_number":253,"context_line":"  can be configured, apply them on the order they are listed in."},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there."}],"source_content_type":"text/x-rst","patch_set":12,"id":"44abd65b_de60dd5a","line":253,"range":{"start_line":253,"start_character":32,"end_line":253,"end_character":34},"updated":"2025-03-07 10:37:11.000000000","message":"\"in the order\"","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"30bb53a9cb755d0a0a31a661f43e36aa786f743e","unresolved":false,"context_lines":[{"line_number":250,"context_line":"  server profiles that cannot be applied. Port, DNSSEC and secure transport"},{"line_number":251,"context_line":"  settings need to be adhered to. If split DNS is not possible a full redirect"},{"line_number":252,"context_line":"  can be used as a fallback. If not all of the server addresses or search domains"},{"line_number":253,"context_line":"  can be configured, apply them on the order they are listed in."},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there."}],"source_content_type":"text/x-rst","patch_set":12,"id":"0914df91_44ac0796","line":253,"range":{"start_line":253,"start_character":32,"end_line":253,"end_character":34},"in_reply_to":"44abd65b_de60dd5a","updated":"2025-03-12 04:05:16.000000000","message":"Done","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":true,"context_lines":[{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"  Note that DNS-related ``--dhcp-option``s will not be handled by this hook."},{"line_number":259,"context_line":"  If any ``--dns server`` option is present, DNS-related ``--dhcp-option``s will"},{"line_number":260,"context_line":"  be ignored. Otherwise foreign_option environment variables will be passed to"},{"line_number":261,"context_line":"  ``--up`` and ``--down`` hooks for backward compatibility."}],"source_content_type":"text/x-rst","patch_set":12,"id":"7490ff27_e8edc43e","line":258,"range":{"start_line":258,"start_character":33,"end_line":258,"end_character":39},"updated":"2025-03-07 10:37:11.000000000","message":"`` `s `` does not work. `` `\u0027s `` seems to work.","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"30bb53a9cb755d0a0a31a661f43e36aa786f743e","unresolved":false,"context_lines":[{"line_number":255,"context_line":"  Note that ``--dns-script`` is not supported on Windows. DNS will"},{"line_number":256,"context_line":"  always be set by the service there."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"  Note that DNS-related ``--dhcp-option``s will not be handled by this hook."},{"line_number":259,"context_line":"  If any ``--dns server`` option is present, DNS-related ``--dhcp-option``s will"},{"line_number":260,"context_line":"  be ignored. Otherwise foreign_option environment variables will be passed to"},{"line_number":261,"context_line":"  ``--up`` and ``--down`` hooks for backward compatibility."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5b7c6b9a_8f0f3287","line":258,"range":{"start_line":258,"start_character":33,"end_line":258,"end_character":39},"in_reply_to":"7490ff27_e8edc43e","updated":"2025-03-12 04:05:16.000000000","message":"docs suggest an escaped space instead","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":true,"context_lines":[{"line_number":256,"context_line":"  always be set by the service there."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"  Note that DNS-related ``--dhcp-option``s will not be handled by this hook."},{"line_number":259,"context_line":"  If any ``--dns server`` option is present, DNS-related ``--dhcp-option``s will"},{"line_number":260,"context_line":"  be ignored. Otherwise foreign_option environment variables will be passed to"},{"line_number":261,"context_line":"  ``--up`` and ``--down`` hooks for backward compatibility."},{"line_number":262,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"794ec9d2_6cd36626","line":259,"range":{"start_line":259,"start_character":66,"end_line":259,"end_character":72},"updated":"2025-03-07 10:37:11.000000000","message":"same","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"30bb53a9cb755d0a0a31a661f43e36aa786f743e","unresolved":false,"context_lines":[{"line_number":256,"context_line":"  always be set by the service there."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"  Note that DNS-related ``--dhcp-option``s will not be handled by this hook."},{"line_number":259,"context_line":"  If any ``--dns server`` option is present, DNS-related ``--dhcp-option``s will"},{"line_number":260,"context_line":"  be ignored. Otherwise foreign_option environment variables will be passed to"},{"line_number":261,"context_line":"  ``--up`` and ``--down`` hooks for backward compatibility."},{"line_number":262,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"6199f7b3_d91c8758","line":259,"range":{"start_line":259,"start_character":66,"end_line":259,"end_character":72},"in_reply_to":"794ec9d2_6cd36626","updated":"2025-03-12 04:05:16.000000000","message":"Done","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":true,"context_lines":[{"line_number":258,"context_line":"  Note that DNS-related ``--dhcp-option``s will not be handled by this hook."},{"line_number":259,"context_line":"  If any ``--dns server`` option is present, DNS-related ``--dhcp-option``s will"},{"line_number":260,"context_line":"  be ignored. Otherwise foreign_option environment variables will be passed to"},{"line_number":261,"context_line":"  ``--up`` and ``--down`` hooks for backward compatibility."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"--down cmd"},{"line_number":264,"context_line":"  Run command ``cmd`` after TUN/TAP device close (post ``--user`` UID"}],"source_content_type":"text/x-rst","patch_set":12,"id":"15d13f22_008f6f3d","line":261,"updated":"2025-03-07 10:37:11.000000000","message":"I think it is \"backward*s* compatibility\"","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"30bb53a9cb755d0a0a31a661f43e36aa786f743e","unresolved":false,"context_lines":[{"line_number":258,"context_line":"  Note that DNS-related ``--dhcp-option``s will not be handled by this hook."},{"line_number":259,"context_line":"  If any ``--dns server`` option is present, DNS-related ``--dhcp-option``s will"},{"line_number":260,"context_line":"  be ignored. Otherwise foreign_option environment variables will be passed to"},{"line_number":261,"context_line":"  ``--up`` and ``--down`` hooks for backward compatibility."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"--down cmd"},{"line_number":264,"context_line":"  Run command ``cmd`` after TUN/TAP device close (post ``--user`` UID"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1d4f23ec_ac1c5e61","line":261,"in_reply_to":"15d13f22_008f6f3d","updated":"2025-03-12 04:05:16.000000000","message":"Both seem to be in use, and the version without the s seems to be more common:\nhttps://en.wikipedia.org/wiki/Backward_compatibility","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"}],"src/openvpn/dns.c":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b35001f62b1028d2790e9de1a23ab9bd836d7259","unresolved":true,"context_lines":[{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    argv_printf(\u0026argv, \"%s\", o-\u003escript);"},{"line_number":544,"context_line":"    argv_msg(M_INFO, \u0026argv);"},{"line_number":545,"context_line":"    int res \u003d openvpn_run_script(\u0026argv, es, S_FATAL|S_EXITCODE, \"dns script\");"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    argv_free(\u0026argv);"},{"line_number":548,"context_line":"    gc_free(\u0026gc);"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"ca2430f5_2693be90","line":545,"updated":"2025-01-17 15:16:05.000000000","message":"This actually lead to annoying problems in my testing. When running without --script-security this hard-exited the program, it didn\u0027t even clean up the interface and routes. S_FATAL seems to hard here?","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"8cf737aee3db4edbab77eaafdbfa86379037580d","unresolved":false,"context_lines":[{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    argv_printf(\u0026argv, \"%s\", o-\u003escript);"},{"line_number":544,"context_line":"    argv_msg(M_INFO, \u0026argv);"},{"line_number":545,"context_line":"    int res \u003d openvpn_run_script(\u0026argv, es, S_FATAL|S_EXITCODE, \"dns script\");"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    argv_free(\u0026argv);"},{"line_number":548,"context_line":"    gc_free(\u0026gc);"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"431ae915_d56a1d76","line":545,"in_reply_to":"ca2430f5_2693be90","updated":"2025-02-27 00:29:40.000000000","message":"Acknowledged","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"}],"src/openvpn/options.c":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"10ba2d701dc42196bb789c3f400871e39012a193","unresolved":true,"context_lines":[{"line_number":908,"context_line":"    o-\u003edisable_dco \u003d true;"},{"line_number":909,"context_line":"#endif /* ENABLE_DCO */"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    o-\u003edns_options.script \u003d DNS_UPDOWN_PATH;"},{"line_number":912,"context_line":"}"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"void"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"dbe1ec14_c2270313","line":911,"updated":"2025-01-17 15:11:17.000000000","message":"This does not work well as an unconditional default I think. The problem here is that if you call openvpn without `--script-security 2` it will error out. I think that should not happen as a default behavior.\n\nA warning seems appropriate, but a complete failure seems overkill?","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"f6dd2c4d365da55b109333a9e76cde93acfef54f","unresolved":false,"context_lines":[{"line_number":908,"context_line":"    o-\u003edisable_dco \u003d true;"},{"line_number":909,"context_line":"#endif /* ENABLE_DCO */"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    o-\u003edns_options.script \u003d DNS_UPDOWN_PATH;"},{"line_number":912,"context_line":"}"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"void"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"7fd139cb_82dfc0a9","line":911,"in_reply_to":"65694cc7_b840e8a4","updated":"2025-03-03 16:44:14.000000000","message":"Done","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"8cf737aee3db4edbab77eaafdbfa86379037580d","unresolved":true,"context_lines":[{"line_number":908,"context_line":"    o-\u003edisable_dco \u003d true;"},{"line_number":909,"context_line":"#endif /* ENABLE_DCO */"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    o-\u003edns_options.script \u003d DNS_UPDOWN_PATH;"},{"line_number":912,"context_line":"}"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"void"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"65694cc7_b840e8a4","line":911,"in_reply_to":"dbe1ec14_c2270313","updated":"2025-02-27 00:29:40.000000000","message":"Built-in script now runs as built-in and should not be complained about any longer.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"10ba2d701dc42196bb789c3f400871e39012a193","unresolved":true,"context_lines":[{"line_number":8042,"context_line":"        to-\u003eip_win32_defined \u003d true;"},{"line_number":8043,"context_line":"    }"},{"line_number":8044,"context_line":"#endif /* ifdef _WIN32 */"},{"line_number":8045,"context_line":"    else if (streq(p[0], \"dns-script\") \u0026\u0026 p[1])"},{"line_number":8046,"context_line":"    {"},{"line_number":8047,"context_line":"        VERIFY_PERMISSION(OPT_P_SCRIPT);"},{"line_number":8048,"context_line":"        if (!no_more_than_n_args(msglevel, p, 2, NM_QUOTE_HINT))"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"8fe2a8a7_b36878ef","line":8045,"updated":"2025-01-17 15:11:17.000000000","message":"New script should be documented in `doc/man-sections/script-options.rst`","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":false,"context_lines":[{"line_number":8042,"context_line":"        to-\u003eip_win32_defined \u003d true;"},{"line_number":8043,"context_line":"    }"},{"line_number":8044,"context_line":"#endif /* ifdef _WIN32 */"},{"line_number":8045,"context_line":"    else if (streq(p[0], \"dns-script\") \u0026\u0026 p[1])"},{"line_number":8046,"context_line":"    {"},{"line_number":8047,"context_line":"        VERIFY_PERMISSION(OPT_P_SCRIPT);"},{"line_number":8048,"context_line":"        if (!no_more_than_n_args(msglevel, p, 2, NM_QUOTE_HINT))"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"39eeba0b_9ae2c8e3","line":8045,"in_reply_to":"55e960a6_805f6e3f","updated":"2025-03-05 10:47:07.000000000","message":"Done","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"8cf737aee3db4edbab77eaafdbfa86379037580d","unresolved":true,"context_lines":[{"line_number":8042,"context_line":"        to-\u003eip_win32_defined \u003d true;"},{"line_number":8043,"context_line":"    }"},{"line_number":8044,"context_line":"#endif /* ifdef _WIN32 */"},{"line_number":8045,"context_line":"    else if (streq(p[0], \"dns-script\") \u0026\u0026 p[1])"},{"line_number":8046,"context_line":"    {"},{"line_number":8047,"context_line":"        VERIFY_PERMISSION(OPT_P_SCRIPT);"},{"line_number":8048,"context_line":"        if (!no_more_than_n_args(msglevel, p, 2, NM_QUOTE_HINT))"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"55e960a6_805f6e3f","line":8045,"in_reply_to":"8fe2a8a7_b36878ef","updated":"2025-02-27 00:29:40.000000000","message":"Actually missed pushing the doc commit the whole time, thanks for pointing it out.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"10ba2d701dc42196bb789c3f400871e39012a193","unresolved":true,"context_lines":[{"line_number":8049,"context_line":"        {"},{"line_number":8050,"context_line":"            goto err;"},{"line_number":8051,"context_line":"        }"},{"line_number":8052,"context_line":"        set_user_script(options, \u0026options-\u003edns_options.script, p[1], p[0], false);"},{"line_number":8053,"context_line":"    }"},{"line_number":8054,"context_line":"    else if (streq(p[0], \"dns\") \u0026\u0026 p[1])"},{"line_number":8055,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"6ad4fbec_6e2fe02e","line":8052,"updated":"2025-01-17 15:11:17.000000000","message":"Again, this does not behave nice at all. This warns that the script is overridden even though it is only set once. And worse, there seems to be no way to unset the script!\n\n```\nOptions error: --dns-script script fails with \u0027\u0027: No such file or directory (errno\u003d2)\n```\n\nI would change this so that the script is unset by default. IFF script-security 2 is set AND the user did not set their own dns-script, then fall back to the default. However, we also need a way for users to disable the dns-script, obviously.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"8cf737aee3db4edbab77eaafdbfa86379037580d","unresolved":true,"context_lines":[{"line_number":8049,"context_line":"        {"},{"line_number":8050,"context_line":"            goto err;"},{"line_number":8051,"context_line":"        }"},{"line_number":8052,"context_line":"        set_user_script(options, \u0026options-\u003edns_options.script, p[1], p[0], false);"},{"line_number":8053,"context_line":"    }"},{"line_number":8054,"context_line":"    else if (streq(p[0], \"dns\") \u0026\u0026 p[1])"},{"line_number":8055,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"c7497690_9e53e4ce","line":8052,"in_reply_to":"6ad4fbec_6e2fe02e","updated":"2025-02-27 00:29:40.000000000","message":"Not sure if we need the possibility to disable --dns-script, as on Windows it is not possible either, but it is implemented now by --dns-script disable, with disable being a reserved \"filename\" for that purpose. Seemed reasonable.\n\nAlso the built-in script requires script-security 1 now, 2 is only needed for user defined scripts, works as intended this way.","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"f6dd2c4d365da55b109333a9e76cde93acfef54f","unresolved":false,"context_lines":[{"line_number":8049,"context_line":"        {"},{"line_number":8050,"context_line":"            goto err;"},{"line_number":8051,"context_line":"        }"},{"line_number":8052,"context_line":"        set_user_script(options, \u0026options-\u003edns_options.script, p[1], p[0], false);"},{"line_number":8053,"context_line":"    }"},{"line_number":8054,"context_line":"    else if (streq(p[0], \"dns\") \u0026\u0026 p[1])"},{"line_number":8055,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"79dede80_0f0470c1","line":8052,"in_reply_to":"c7497690_9e53e4ce","updated":"2025-03-03 16:44:14.000000000","message":"Done","commit_id":"7daa5b579bb18ac705d3da4412cc5b24c935dadc"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"c8d05098849968202226efef3cc569a9581ef225","unresolved":true,"context_lines":[{"line_number":528,"context_line":"    \"                  sni \u003cdomain\u003e : DNS server name indication\\n\""},{"line_number":529,"context_line":"    \"--dns search-domains \u003cdomain\u003e [domain ...]:\\n\""},{"line_number":530,"context_line":"    \"                  Add domains to DNS domain search list\\n\""},{"line_number":531,"context_line":"    \"--dns-script cmd : Run cmd as user defined dns configuration script\\n\""},{"line_number":532,"context_line":"    \"--auth-retry t  : How to handle auth failures.  Set t to\\n\""},{"line_number":533,"context_line":"    \"                  none (default), interact, or nointeract.\\n\""},{"line_number":534,"context_line":"    \"--static-challenge t e [\u003cscrv1|concat\u003e]: Enable static challenge/response protocol using\\n\""}],"source_content_type":"text/x-csrc","patch_set":9,"id":"8ee3982a_93d7f782","line":531,"updated":"2025-03-05 10:47:07.000000000","message":"Would change this to `--dns-script disable|cmd`","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"5c75a39d1bc67ece13ce9786f03fc2a9421b2f16","unresolved":false,"context_lines":[{"line_number":528,"context_line":"    \"                  sni \u003cdomain\u003e : DNS server name indication\\n\""},{"line_number":529,"context_line":"    \"--dns search-domains \u003cdomain\u003e [domain ...]:\\n\""},{"line_number":530,"context_line":"    \"                  Add domains to DNS domain search list\\n\""},{"line_number":531,"context_line":"    \"--dns-script cmd : Run cmd as user defined dns configuration script\\n\""},{"line_number":532,"context_line":"    \"--auth-retry t  : How to handle auth failures.  Set t to\\n\""},{"line_number":533,"context_line":"    \"                  none (default), interact, or nointeract.\\n\""},{"line_number":534,"context_line":"    \"--static-challenge t e [\u003cscrv1|concat\u003e]: Enable static challenge/response protocol using\\n\""}],"source_content_type":"text/x-csrc","patch_set":9,"id":"0d724591_b54e593c","line":531,"in_reply_to":"8ee3982a_93d7f782","updated":"2025-03-06 12:59:38.000000000","message":"Acknowledged","commit_id":"539d53989b123df43e56685b7672299961d9307c"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"b9dae247e529a22ee0ff93ee51e9f060b65ea298","unresolved":true,"context_lines":[{"line_number":528,"context_line":"    \"                  sni \u003cdomain\u003e : DNS server name indication\\n\""},{"line_number":529,"context_line":"    \"--dns search-domains \u003cdomain\u003e [domain ...]:\\n\""},{"line_number":530,"context_line":"    \"                  Add domains to DNS domain search list\\n\""},{"line_number":531,"context_line":"    \"--dns-script cmd : Run cmd as user defined dns configuration script\\n\""},{"line_number":532,"context_line":"    \"--auth-retry t  : How to handle auth failures.  Set t to\\n\""},{"line_number":533,"context_line":"    \"                  none (default), interact, or nointeract.\\n\""},{"line_number":534,"context_line":"    \"--static-challenge t e [\u003cscrv1|concat\u003e]: Enable static challenge/response protocol using\\n\""}],"source_content_type":"text/x-csrc","patch_set":12,"id":"be2e97aa_62e6de9d","line":531,"updated":"2025-03-07 10:37:11.000000000","message":"Add the `|disable` here","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"30bb53a9cb755d0a0a31a661f43e36aa786f743e","unresolved":false,"context_lines":[{"line_number":528,"context_line":"    \"                  sni \u003cdomain\u003e : DNS server name indication\\n\""},{"line_number":529,"context_line":"    \"--dns search-domains \u003cdomain\u003e [domain ...]:\\n\""},{"line_number":530,"context_line":"    \"                  Add domains to DNS domain search list\\n\""},{"line_number":531,"context_line":"    \"--dns-script cmd : Run cmd as user defined dns configuration script\\n\""},{"line_number":532,"context_line":"    \"--auth-retry t  : How to handle auth failures.  Set t to\\n\""},{"line_number":533,"context_line":"    \"                  none (default), interact, or nointeract.\\n\""},{"line_number":534,"context_line":"    \"--static-challenge t e [\u003cscrv1|concat\u003e]: Enable static challenge/response protocol using\\n\""}],"source_content_type":"text/x-csrc","patch_set":12,"id":"253131df_4812f96a","line":531,"in_reply_to":"be2e97aa_62e6de9d","updated":"2025-03-12 04:05:16.000000000","message":"Done","commit_id":"75b0d416247c1e3421a2f041c5503f5177aa9f65"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"61744fbf415a63b8dec6ef05471403ee0d955bb0","unresolved":true,"context_lines":[{"line_number":923,"context_line":"    o-\u003edisable_dco \u003d true;"},{"line_number":924,"context_line":"#endif /* ENABLE_DCO */"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"#ifdef ENABLE_DNS_SCRIPT"},{"line_number":927,"context_line":"    o-\u003edns_options.script \u003d DNS_UPDOWN_PATH;"},{"line_number":928,"context_line":"#endif /* ENABLE_DNS_SCRIPT */"},{"line_number":929,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":15,"id":"f473ebac_d6d18ad0","line":926,"updated":"2025-03-19 14:41:16.000000000","message":"should that be ENABLE_DNS_UPDOWN?","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"c33224aab79ef5d40f42e2f67adf0bd3ee40fd7e","unresolved":false,"context_lines":[{"line_number":923,"context_line":"    o-\u003edisable_dco \u003d true;"},{"line_number":924,"context_line":"#endif /* ENABLE_DCO */"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"#ifdef ENABLE_DNS_SCRIPT"},{"line_number":927,"context_line":"    o-\u003edns_options.script \u003d DNS_UPDOWN_PATH;"},{"line_number":928,"context_line":"#endif /* ENABLE_DNS_SCRIPT */"},{"line_number":929,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":15,"id":"929d0d87_38955934","line":926,"in_reply_to":"f473ebac_d6d18ad0","updated":"2025-03-19 22:45:28.000000000","message":"Done","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"61744fbf415a63b8dec6ef05471403ee0d955bb0","unresolved":true,"context_lines":[{"line_number":8224,"context_line":"        {"},{"line_number":8225,"context_line":"            goto err;"},{"line_number":8226,"context_line":"        }"},{"line_number":8227,"context_line":"#ifdef ENABLE_DNS_SCRIPT"},{"line_number":8228,"context_line":"        if (streq(p[1], \"disable\"))"},{"line_number":8229,"context_line":"        {"},{"line_number":8230,"context_line":"            options-\u003edns_options.updown \u003d NULL;"}],"source_content_type":"text/x-csrc","patch_set":15,"id":"de0f1212_6e2780f2","line":8227,"updated":"2025-03-19 14:41:16.000000000","message":"same here","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"},{"author":{"_account_id":1000006,"name":"Heiko Hund","display_name":"Heiko Hund","email":"heiko@ist.eigentlich.net","username":"d12fk"},"change_message_id":"c33224aab79ef5d40f42e2f67adf0bd3ee40fd7e","unresolved":false,"context_lines":[{"line_number":8224,"context_line":"        {"},{"line_number":8225,"context_line":"            goto err;"},{"line_number":8226,"context_line":"        }"},{"line_number":8227,"context_line":"#ifdef ENABLE_DNS_SCRIPT"},{"line_number":8228,"context_line":"        if (streq(p[1], \"disable\"))"},{"line_number":8229,"context_line":"        {"},{"line_number":8230,"context_line":"            options-\u003edns_options.updown \u003d NULL;"}],"source_content_type":"text/x-csrc","patch_set":15,"id":"b0363c3c_449e72d0","line":8227,"in_reply_to":"de0f1212_6e2780f2","updated":"2025-03-19 22:45:28.000000000","message":"Done","commit_id":"829e0f90bd12e78f8a580d3f5197edcbe041604a"}]}
