)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"8297e19a8ae0678ac2aa678f12c23bee71e66386","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"On macOS at least, sendto() will return EADDRNOTAVAIL in many of these"},{"line_number":16,"context_line":"cases, because the route is still active but the \"egress interface\" is"},{"line_number":17,"context_line":"not - so we can notice, and restart the instance.  A full SIGHUP restart"},{"line_number":18,"context_line":"is needed because we need to remove all overlapping routes first, before"},{"line_number":19,"context_line":"a reconnect can work."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"0ef016e2_d2031880","line":17,"updated":"2026-08-03 10:53:10.000000000","message":"I think SIGHUP is a bit too much here since it reloads the config and other things. I think SIGUSR1 should be enough. If we need to remove routes/close tun we should have some flag/extended SIGURS1.","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"4b9805147066f5cdb9fcbd3b28038ff9439f43e7","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"On macOS at least, sendto() will return EADDRNOTAVAIL in many of these"},{"line_number":16,"context_line":"cases, because the route is still active but the \"egress interface\" is"},{"line_number":17,"context_line":"not - so we can notice, and restart the instance.  A full SIGHUP restart"},{"line_number":18,"context_line":"is needed because we need to remove all overlapping routes first, before"},{"line_number":19,"context_line":"a reconnect can work."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"e511e034_10a29e06","line":17,"in_reply_to":"0ef016e2_d2031880","updated":"2026-08-03 11:16:25.000000000","message":"SIGUSR1 does not work (at least not if there is a `--persist-tun` in the config, need to re-test `SIGUSR1 without persist-tun`), as we have no signalling for \"remove all routes, but keep tun, reconnect\".\n\nI need to look more closely at logs, it seems, as I thought `--ping-restart` would trigger `SIGHUP`, but the documentation tells me otherwise.  Wait for v3...","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"75dcf8ff794a08aac1d81038bfa48b2d307e358e","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c32792ff_3e0c274a","updated":"2026-08-03 10:00:52.000000000","message":"!!!","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"4b9805147066f5cdb9fcbd3b28038ff9439f43e7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9a17c0a6_a11396fe","in_reply_to":"c32792ff_3e0c274a","updated":"2026-08-03 11:16:25.000000000","message":"Done","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"}],"src/openvpn/forward.c":[{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"75dcf8ff794a08aac1d81038bfa48b2d307e358e","unresolved":true,"context_lines":[{"line_number":1862,"context_line":"         * around, we get \"cannot assign requested address\" as a fairly"},{"line_number":1863,"context_line":"         * reliable (and quick!) indicator for \"this connection is dead\""},{"line_number":1864,"context_line":"         */"},{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"c67a9662_957cf4b1","line":1865,"updated":"2026-08-03 10:00:52.000000000","message":"Here you should be checking for `error_code`, not `errno`. check_status() mangles errno on Linux/Android, thus making this check wrong/no-op on those platforms.\nI presume on macOS it works by accident.\n\nWhat about Windows? 😄 do we need the same dance as above with `WSAEADDRNOTAVAIL`?","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"4b9805147066f5cdb9fcbd3b28038ff9439f43e7","unresolved":true,"context_lines":[{"line_number":1862,"context_line":"         * around, we get \"cannot assign requested address\" as a fairly"},{"line_number":1863,"context_line":"         * reliable (and quick!) indicator for \"this connection is dead\""},{"line_number":1864,"context_line":"         */"},{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"f2b2751a_e3b2d8b0","line":1865,"in_reply_to":"c67a9662_957cf4b1","updated":"2026-08-03 11:16:25.000000000","message":"good catch.  Will adjust.\n\nNo idea what windows does, but it\u0027s not really relevant - this fixes one particular situation on one particular platform, while not making things worse for other platforms (if *that* error comes back, our socket is no longer fit for the purpose).","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"6f4a0b9c18d762752e1f6c72ed6bdf0c28e9f577","unresolved":true,"context_lines":[{"line_number":1862,"context_line":"         * around, we get \"cannot assign requested address\" as a fairly"},{"line_number":1863,"context_line":"         * reliable (and quick!) indicator for \"this connection is dead\""},{"line_number":1864,"context_line":"         */"},{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"572a9546_aa6773b9","line":1865,"in_reply_to":"f2b2751a_e3b2d8b0","updated":"2026-08-03 13:27:33.000000000","message":"well, unless EADDRNOTAVAIL on Windows is equal to some WSRANDOMTHING that may be returned under other circumstances, no (hopefully not)?","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"75dcf8ff794a08aac1d81038bfa48b2d307e358e","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"a68ccbf3_e4b9715b","line":1868,"updated":"2026-08-03 10:00:52.000000000","message":"There is no guard preventing this check to fire on a server....If that happens we are restarting the whole top instance 😊 I presume this can also happen on a per server-client-instance. In that case we\u0027d drop the client, but it may be what we wanted.\n\nTo fix the server problem, maybe you could add a simple `\u0026\u0026 c-\u003eoptions.mode \u003d\u003d MODE_POINT_TO_POINT` to the check?","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"75dcf8ff794a08aac1d81038bfa48b2d307e358e","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"fca69be4_0e3abe9f","line":1868,"updated":"2026-08-03 10:00:52.000000000","message":"have you checked how this SIGHUP interacts with `--connect-retry-max` ? SIGHUP makes openvpn re-read the config and re-init its state, which translates in ignoring the retry-max configured option. It\u0027s a rare hit, but still this patch bypasses that logic.\n\nIf by any chance this error becomes persistent, the client would never exit instead of bailing out out the maximum retries.","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"75dcf8ff794a08aac1d81038bfa48b2d307e358e","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2d503b5e_02d2c130","line":1868,"updated":"2026-08-03 10:00:52.000000000","message":"using SIGHUP this way makes `--config stdin` + `--remap-usr1 SIGHUP` a fatal usage error: SIGHUP re-reads the config, but stdin is at EOF.\nThis patch registers SIGHUP without checking both options...You can check by issuing SIGHUP on a stdin-config daemon and it will die with `Options error: blah blah blah`.","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"4b9805147066f5cdb9fcbd3b28038ff9439f43e7","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"6ec1208a_91cf9db6","line":1868,"in_reply_to":"2d503b5e_02d2c130","updated":"2026-08-03 11:16:25.000000000","message":"I can\u0027t follow you.  I am not raising SIGUSR1, so why should `remap-usr1` be relevant here?","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"6f4a0b9c18d762752e1f6c72ed6bdf0c28e9f577","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"c7127dda_9938ba98","line":1868,"in_reply_to":"6ec1208a_91cf9db6","updated":"2026-08-03 13:27:33.000000000","message":"you\u0027re right. I was testing with `--config stdin` and the other option was already there in my harness, but it\u0027s indeed irrelevant.\n\nAt the same time I searched this pattern across the code and I saw other spots where we register SIGHUP without checking if config is coming from stdin. So this patch has indeed this issue, but it\u0027s not new :-D !!!\n\nYou can decide if you want to add a guard here or if this should be fixed later on along the other spots.\n\nMoreover, the other spots where we register SIGHUP have a `c-\u003epersist.restart_sleep_seconds \u003d 10;` right after, so that we do not busy loop in case of permanent error. Worth adding here too?","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"6f4a0b9c18d762752e1f6c72ed6bdf0c28e9f577","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"8a5b06fd_81757e6d","line":1868,"in_reply_to":"8e8a2c47_c038c444","updated":"2026-08-03 13:27:33.000000000","message":"When we hit `connect_retry_max` attempts, we have an M_FATAL that stops everything.\nWith this patch we\u0027ll keep looping.\n\nNote, as I said in the other comment, there are other areas of the code where we register SIGHUP and also in those cases we don\u0027t honor `connect-max-reply`...","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"6f4a0b9c18d762752e1f6c72ed6bdf0c28e9f577","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"1f257674_6a405be6","line":1868,"in_reply_to":"9ca7aeec_dcbc3856","updated":"2026-08-03 13:27:33.000000000","message":"Agreed this might be difficult, but there might be other scenarios (which we are not seeing now) that may trigger this error. Thanks!","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"4b9805147066f5cdb9fcbd3b28038ff9439f43e7","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9ca7aeec_dcbc3856","line":1868,"in_reply_to":"a68ccbf3_e4b9715b","updated":"2026-08-03 11:16:25.000000000","message":"I\u0027m not sure this can be triggered in a meaningful way on a server - there are no redirect routes for client IPs that might stop working on an interface change.  It might be triggerable if `--bind` is in use and someone configures away the bound IP address - in which case, we\u0027ll just fail either way.  But I can add a guard here.","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"4b9805147066f5cdb9fcbd3b28038ff9439f43e7","unresolved":true,"context_lines":[{"line_number":1865,"context_line":"        if (size \u003c 0 \u0026\u0026 errno \u003d\u003d EADDRNOTAVAIL)"},{"line_number":1866,"context_line":"        {"},{"line_number":1867,"context_line":"            msg(M_INFO, \"UDP socket broken, assuming client-link change, restarting\");"},{"line_number":1868,"context_line":"            register_signal(c-\u003esig, SIGHUP, \"link-changed\");"},{"line_number":1869,"context_line":"        }"},{"line_number":1870,"context_line":"    }"},{"line_number":1871,"context_line":"    else"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"8e8a2c47_c038c444","line":1868,"in_reply_to":"fca69be4_0e3abe9f","updated":"2026-08-03 11:16:25.000000000","message":"In this case, we would do a `SIGHUP` reconnect anyway, just \"after `--ping-restart` expires\".  No?  So nothing changes,","commit_id":"86bac756964e392febc55fb025cba9a203b8befa"}]}
