)]}'
{"id":"openvpn~1704","triplet_id":"openvpn~master~I21d782780b7f89b3061dd97500589a24415afc23","project":"openvpn","branch":"master","full_branch":"refs/heads/master","attention_set":{"1000008":{"account":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"last_update":"2026-10-06 07:11:26.000000000","reason":"Someone else replied on the change"},"1000003":{"account":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"last_update":"2026-05-27 11:41:48.000000000","reason":"Reviewer was added"}},"removed_from_attention_set":{},"hashtags":[],"change_id":"I21d782780b7f89b3061dd97500589a24415afc23","subject":"route: Don\u0027t delete pre-existing host route to VPN server on disconnect","status":"NEW","created":"2026-05-27 11:41:48.000000000","updated":"2026-10-06 07:11:26.000000000","submit_type":"CHERRY_PICK","total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"32c581b302fd99294498b3808259b4ed9cda1734","_number":1704,"virtual_id_number":1704,"owner":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"actions":{},"labels":{"Code-Review":{"recommended":{"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"},"all":[{"value":1,"date":"2026-10-06 07:11:26.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"},{"value":0,"permitted_voting_range":{"min":-2,"max":2},"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"}],"values":{"-2":"This shall not be submitted","-1":"I would prefer this is not submitted as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","value":1,"default_value":0}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},{"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"}],"CC":[{"_account_id":1000026,"name":"openvpn-devel","email":"openvpn-devel@lists.sourceforge.net","username":"openvpn-devel"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2026-05-27 11:41:48.000000000","updated_by":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"real_updated_by":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"reviewer":{"_account_id":1000026,"name":"openvpn-devel","email":"openvpn-devel@lists.sourceforge.net","username":"openvpn-devel"},"state":"CC"},{"updated":"2026-05-27 11:41:48.000000000","updated_by":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"real_updated_by":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"reviewer":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"state":"REVIEWER"},{"updated":"2026-10-06 07:11:26.000000000","updated_by":{"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"},"real_updated_by":{"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"},"reviewer":{"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"},"state":"REVIEWER"}],"messages":[{"id":"46cdef80c8966364acd21a5b4d4c27ae9b19f989","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"date":"2026-05-27 11:41:48.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"32c581b302fd99294498b3808259b4ed9cda1734","author":{"_account_id":1000054,"name":"chugly","email":"charlie.vigue@openvpn.com","username":"chugly"},"date":"2026-10-06 07:11:26.000000000","message":"Patch Set 1: Code-Review+1\n\nTested on Linux in a network namespace (static-key p2p, --redirect-gateway def1), comparing this change against its parent:\n\n- no pre-existing route: the host route to the server is added and removed on exit, same as before\n- pre-existing host route to the server: the parent deletes it on exit, this change keeps it\n- pre-existing route to the LAN gateway with block-local (the bypass path): the parent deletes it, this change keeps it\n\nI also read through the Windows side, since #970 is a Windows report: add_route_service() and add_route_ipapi() both return RTA_EEXIST on ERROR_OBJECT_ALREADY_EXISTS, so the fix applies with the default route methods. With route.exe an existing route makes the add fail, so it was never marked for deletion in the first place.\n\nWith --persist-tun the route list survives a restart and routes aren\u0027t re-added, so a route we added ourselves isn\u0027t mistaken for a pre-existing one on reconnect.","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"cfb380539f4084fd65cb54b175cd5258e67cfb0f","revisions":{"cfb380539f4084fd65cb54b175cd5258e67cfb0f":{"kind":"REWORK","_number":1,"created":"2026-05-27 11:41:48.000000000","uploader":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"ref":"refs/changes/04/1704/1","fetch":{"anonymous http":{"url":"https://gerrit.openvpn.net/openvpn","ref":"refs/changes/04/1704/1","commands":{"Branch":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/04/1704/1 \u0026\u0026 git checkout -b change-1704 FETCH_HEAD","Checkout":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/04/1704/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/04/1704/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/04/1704/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://gerrit.openvpn.net/openvpn refs/changes/04/1704/1","Reset To":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/04/1704/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"2b8afc6c685f4e451fd0fa5aa37f18147520dfc1","subject":"openvpnserv: always use W variant of RpcStringFree()"}],"author":{"name":"Lev Stipakov","email":"lev@openvpn.net","date":"2026-05-27 11:08:03.000000000","tz":180},"committer":{"name":"Lev Stipakov","email":"lev@openvpn.net","date":"2026-05-27 11:35:10.000000000","tz":180},"subject":"route: Don\u0027t delete pre-existing host route to VPN server on disconnect","message":"route: Don\u0027t delete pre-existing host route to VPN server on disconnect\n\nWhen a host route to the VPN server already exists at connect time\n(e.g. a manually configured static route), add_route3() returns true\nfor both \"successfully added\" and \"already exists\" but discards the\nper-route RT_ADDED bit, since it operates on a local struct route_ipv4.\nThe caller in redirect_default_route_to_vpn() then sets RL_DID_LOCAL\nunconditionally, and on disconnect undo_redirect_default_route_to_vpn()\nasks del_route3() to delete it -- which forces RT_ADDED on a fresh struct,\nbypassing delete_route()\u0027s protective guard. The result: the pre-existing\nroute gets removed.\n\nChange add_route3() to return RTA_SUCCESS / RTA_EEXIST / RTA_ERROR by\ninspecting the local struct\u0027s RT_ADDED bit after add_route(). Only set\nRL_DID_LOCAL on RTA_SUCCESS so a pre-existing route survives disconnect.\nApply the same fix to the DHCP/DNS bypass routes via a new\nroute_bypass.bypass_added bitmask so each entry is only deleted on undo\nif we added it.\n\nGitHub: #970\n\nChange-Id: I21d782780b7f89b3061dd97500589a24415afc23\nSigned-off-by: Lev Stipakov \u003clev@openvpn.net\u003e\n"},"branch":"refs/heads/master"}},"requirements":[{"status":"NOT_READY","fallback_text":"All required checks must pass","type":"checks_pass"}],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"NOT_READY","labels":[{"label":"Code-Review","status":"NEED"}]},{"rule_name":"checks~ChecksSubmitRule","status":"NOT_READY","requirements":[{"status":"NOT_READY","fallback_text":"All required checks must pass","type":"checks_pass"}]}]}
