)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"8a53a7292b1f18aa0530332e10f242278fdfeee0","unresolved":true,"context_lines":[{"line_number":10,"context_line":"implementation."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This adds concept of \"mode\" to DCO implementation,"},{"line_number":13,"context_line":"which is peer-to-peer or multipeer. Depends on mode,"},{"line_number":14,"context_line":"some functions use MP-specific IOCTL commands, which"},{"line_number":15,"context_line":"include peer-id as a part of input."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1ce19e92_b7d332b3","line":13,"updated":"2024-11-22 14:59:46.000000000","message":"\"Depending\"","commit_id":"d6c680f030929677ba0c11f5b26c1e456662a81b"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"50cae42f8fe3e13289a86e98446408a02dd258d9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"implementation."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This adds concept of \"mode\" to DCO implementation,"},{"line_number":13,"context_line":"which is peer-to-peer or multipeer. Depends on mode,"},{"line_number":14,"context_line":"some functions use MP-specific IOCTL commands, which"},{"line_number":15,"context_line":"include peer-id as a part of input."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"feb95366_18bad37b","line":13,"in_reply_to":"1ce19e92_b7d332b3","updated":"2024-11-22 15:37:56.000000000","message":"Acknowledged","commit_id":"d6c680f030929677ba0c11f5b26c1e456662a81b"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"8a53a7292b1f18aa0530332e10f242278fdfeee0","unresolved":true,"context_lines":[{"line_number":22,"context_line":"sockaddr of the peer - this allows userspace to distinguish"},{"line_number":23,"context_line":"among peers. Sadly there is no reliable way to get peer local"},{"line_number":24,"context_line":"address, such as on Linux/FreeBSD, so we have to do a bit of"},{"line_number":25,"context_line":"guesswork figure out IP address based on remote IP and local"},{"line_number":26,"context_line":"routing table, which may backfire if there are multiple IPs"},{"line_number":27,"context_line":"assigned to the same network adapter. However, as for now"},{"line_number":28,"context_line":"peer-specific local IP is not used by the driver. We use"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7ac9dcb0_dc2d3e45","line":25,"updated":"2024-11-22 14:59:46.000000000","message":"\"to figure out\"","commit_id":"d6c680f030929677ba0c11f5b26c1e456662a81b"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"50cae42f8fe3e13289a86e98446408a02dd258d9","unresolved":false,"context_lines":[{"line_number":22,"context_line":"sockaddr of the peer - this allows userspace to distinguish"},{"line_number":23,"context_line":"among peers. Sadly there is no reliable way to get peer local"},{"line_number":24,"context_line":"address, such as on Linux/FreeBSD, so we have to do a bit of"},{"line_number":25,"context_line":"guesswork figure out IP address based on remote IP and local"},{"line_number":26,"context_line":"routing table, which may backfire if there are multiple IPs"},{"line_number":27,"context_line":"assigned to the same network adapter. However, as for now"},{"line_number":28,"context_line":"peer-specific local IP is not used by the driver. We use"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"a36d4478_9d54a2df","line":25,"in_reply_to":"7ac9dcb0_dc2d3e45","updated":"2024-11-22 15:37:56.000000000","message":"Acknowledged","commit_id":"d6c680f030929677ba0c11f5b26c1e456662a81b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"5d6cd3937ff01e52987661ccd8b90f061435c3ca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"df9401e6_5970973a","updated":"2025-02-04 20:11:19.000000000","message":"This looks all reasonable from what I have seen.  It needs to be rebased to the current state of \"multisocket\" (just use today\u0027s master) because too much has changed in the \"local socket\" handling - mostly \"everything is an array now\".\n\nI would suggest to have an extra check `if (number of --local statements \u003e 1) { disable_dco(); }` and then just use `link_socket[0]` - as long as the kernel driver doesn\u0027t support multi sockets, we do not need to bother with that in the userland side (and multisocket isn\u0027t done yet anyway).","commit_id":"d49d6e7c26cc4ce0270eef15b7186ab0d9762826"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"d640839c_b5b2867c","updated":"2025-02-05 19:11:20.000000000","message":"Oh well, when I start, I tend to find things... sorry for that.","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"}],"src/openvpn/dco_win.c":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    return res;"},{"line_number":126,"context_line":"}"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"bool"},{"line_number":129,"context_line":"ovpn_dco_init(int mode, dco_context_t *dco, const char *dev_node)"},{"line_number":130,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"9f12680a_836a673a","line":127,"updated":"2025-02-05 19:11:20.000000000","message":"A few words of comment somewhere on the call chain \"who calls what, in which sequence\" for p2p and mp mode would help me get less confused... there\u0027s so many \"open\", \"init\" and \"start\" functions here.","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    return res;"},{"line_number":126,"context_line":"}"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"bool"},{"line_number":129,"context_line":"ovpn_dco_init(int mode, dco_context_t *dco, const char *dev_node)"},{"line_number":130,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"958d5b8c_a18c12a8","line":127,"in_reply_to":"9f12680a_836a673a","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":129,"context_line":"ovpn_dco_init(int mode, dco_context_t *dco, const char *dev_node)"},{"line_number":130,"context_line":"{"},{"line_number":131,"context_line":"    /* for p2p dco-\u003emode is already set */"},{"line_number":132,"context_line":"    dco-\u003emode \u003d (mode \u003d\u003d MODE_POINT_TO_POINT) ? dco_mode_p2p : dco_mode_mp;"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if (dco-\u003emode \u003d\u003d dco_mode_p2p)"},{"line_number":135,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"410773f9_bc0b637c","line":132,"updated":"2025-02-05 19:11:20.000000000","message":"that comment is slightly confusing - if it is \"already set\", then why do we set it again?","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":129,"context_line":"ovpn_dco_init(int mode, dco_context_t *dco, const char *dev_node)"},{"line_number":130,"context_line":"{"},{"line_number":131,"context_line":"    /* for p2p dco-\u003emode is already set */"},{"line_number":132,"context_line":"    dco-\u003emode \u003d (mode \u003d\u003d MODE_POINT_TO_POINT) ? dco_mode_p2p : dco_mode_mp;"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    if (dco-\u003emode \u003d\u003d dco_mode_p2p)"},{"line_number":135,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"23adf9fa_be8de950","line":132,"in_reply_to":"410773f9_bc0b637c","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":143,"context_line":"    gc_free(\u0026gc);"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    /* set mp mode */"},{"line_number":146,"context_line":"    OVPN_MODE m \u003d OVPN_MODE_MP;"},{"line_number":147,"context_line":"    DWORD bytes_returned \u003d 0;"},{"line_number":148,"context_line":"    if (!DeviceIoControl(dco-\u003ett-\u003ehand, OVPN_IOCTL_SET_MODE, \u0026m, sizeof(m), NULL, 0, \u0026bytes_returned, NULL))"},{"line_number":149,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"f14e44de_56a2dc7b","line":146,"updated":"2025-02-05 19:11:20.000000000","message":"here we have a new define for communication between driver and userland, which does the same as `dco_mode_mp`...","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"1560972bb58e9d08b863b414092a8b897f870037","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    gc_free(\u0026gc);"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    /* set mp mode */"},{"line_number":146,"context_line":"    OVPN_MODE m \u003d OVPN_MODE_MP;"},{"line_number":147,"context_line":"    DWORD bytes_returned \u003d 0;"},{"line_number":148,"context_line":"    if (!DeviceIoControl(dco-\u003ett-\u003ehand, OVPN_IOCTL_SET_MODE, \u0026m, sizeof(m), NULL, 0, \u0026bytes_returned, NULL))"},{"line_number":149,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"00d94363_34c9a1fd","line":146,"in_reply_to":"7778dea2_f293c54f","updated":"2025-02-06 18:46:54.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":true,"context_lines":[{"line_number":143,"context_line":"    gc_free(\u0026gc);"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    /* set mp mode */"},{"line_number":146,"context_line":"    OVPN_MODE m \u003d OVPN_MODE_MP;"},{"line_number":147,"context_line":"    DWORD bytes_returned \u003d 0;"},{"line_number":148,"context_line":"    if (!DeviceIoControl(dco-\u003ett-\u003ehand, OVPN_IOCTL_SET_MODE, \u0026m, sizeof(m), NULL, 0, \u0026bytes_returned, NULL))"},{"line_number":149,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"7778dea2_f293c54f","line":146,"in_reply_to":"f14e44de_56a2dc7b","updated":"2025-02-06 18:45:33.000000000","message":"Yeah, this one is from the driver API. But I see the frustration.","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":288,"context_line":"        msg(M_ERR, \"DeviceIoControl(OVPN_IOCTL_MP_START_VPN) failed\");"},{"line_number":289,"context_line":"    }"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    if (out.ListenAddress.Addr4.sin_family \u003d\u003d AF_INET)"},{"line_number":292,"context_line":"    {"},{"line_number":293,"context_line":"        memcpy(\u0026sock-\u003einfo.lsa-\u003eactual.dest.addr.in4, \u0026out.ListenAddress.Addr4, sizeof(struct sockaddr_in));"},{"line_number":294,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"aaa33b91_1d10db5c","line":291,"updated":"2025-02-05 19:11:20.000000000","message":"This part confuses me.  What is `out`?  Why is it put into `actual.dest`?  This seems to be the address of the peer we\u0027re talking to, judging from other uses of `actual.dest` but then it shouldn\u0027t be tied to the \"global\" DCO opening, but to individual peers?   Or am I totally misunderstanding this?","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"1560972bb58e9d08b863b414092a8b897f870037","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        msg(M_ERR, \"DeviceIoControl(OVPN_IOCTL_MP_START_VPN) failed\");"},{"line_number":289,"context_line":"    }"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    if (out.ListenAddress.Addr4.sin_family \u003d\u003d AF_INET)"},{"line_number":292,"context_line":"    {"},{"line_number":293,"context_line":"        memcpy(\u0026sock-\u003einfo.lsa-\u003eactual.dest.addr.in4, \u0026out.ListenAddress.Addr4, sizeof(struct sockaddr_in));"},{"line_number":294,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"33928f1a_ab08b8c6","line":291,"in_reply_to":"0dc53053_22601180","updated":"2025-02-06 18:46:54.000000000","message":"Done","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":true,"context_lines":[{"line_number":288,"context_line":"        msg(M_ERR, \"DeviceIoControl(OVPN_IOCTL_MP_START_VPN) failed\");"},{"line_number":289,"context_line":"    }"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    if (out.ListenAddress.Addr4.sin_family \u003d\u003d AF_INET)"},{"line_number":292,"context_line":"    {"},{"line_number":293,"context_line":"        memcpy(\u0026sock-\u003einfo.lsa-\u003eactual.dest.addr.in4, \u0026out.ListenAddress.Addr4, sizeof(struct sockaddr_in));"},{"line_number":294,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"0dc53053_22601180","line":291,"in_reply_to":"aaa33b91_1d10db5c","updated":"2025-02-06 18:45:33.000000000","message":"The driver writes to out the local transport address of the socket after the bind() call. But we already know the local bind address, except maybe the port, we probably don\u0027t want to bind to port 0. It seems that there is no use of this data, so I\u0027ll remove those lines.","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":390,"context_line":""},{"line_number":391,"context_line":"static struct sockaddr *"},{"line_number":392,"context_line":"dco_get_source_ip_for_dst(const struct sockaddr *dst)"},{"line_number":393,"context_line":"{"},{"line_number":394,"context_line":"    SOCKADDR_INET dst_in \u003d { 0 };"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    /* Cast the destination address to SOCKADDR_INET */"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"ac5dc11e_4884b3b4","line":393,"updated":"2025-02-05 19:11:20.000000000","message":"I do wonder why this is necessary.  \"Use best source for destination\" is what happens automatically when passing an UDP packet without source to `sendto()`.  Is this different in kernel space?  Why was this not needed for p2p win-dco?\n\n(As in, if kernel space will automatically put the \"best source\" in the packet anyway, we can just get rid of all code dealing with \"best_src\")","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"1560972bb58e9d08b863b414092a8b897f870037","unresolved":false,"context_lines":[{"line_number":390,"context_line":""},{"line_number":391,"context_line":"static struct sockaddr *"},{"line_number":392,"context_line":"dco_get_source_ip_for_dst(const struct sockaddr *dst)"},{"line_number":393,"context_line":"{"},{"line_number":394,"context_line":"    SOCKADDR_INET dst_in \u003d { 0 };"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    /* Cast the destination address to SOCKADDR_INET */"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"f8813ec3_9bac21f1","line":393,"in_reply_to":"26e4fbd9_488525de","updated":"2025-02-06 18:46:54.000000000","message":"Done","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":true,"context_lines":[{"line_number":390,"context_line":""},{"line_number":391,"context_line":"static struct sockaddr *"},{"line_number":392,"context_line":"dco_get_source_ip_for_dst(const struct sockaddr *dst)"},{"line_number":393,"context_line":"{"},{"line_number":394,"context_line":"    SOCKADDR_INET dst_in \u003d { 0 };"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    /* Cast the destination address to SOCKADDR_INET */"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"26e4fbd9_488525de","line":393,"in_reply_to":"ac5dc11e_4884b3b4","updated":"2025-02-06 18:45:33.000000000","message":"I see. At the moment driver doesn\u0027t use local transport address of the peer, although this is a part of API. I will remove this code.","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"}],"src/openvpn/dco_win.h":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"struct dco_context {"},{"line_number":41,"context_line":"    struct tuntap *tt;"},{"line_number":42,"context_line":"    dco_mode_type mode;"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"};"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":18,"id":"8bc501cb_073ac40b","line":42,"updated":"2025-02-05 19:11:20.000000000","message":"I\u0027m not really happy with that.  `dco_linux` has its own very similar enum, with uppercase `DCO_MODE_\u003cxx\u003e` and calls the member variable `dco-\u003eifmode`.  Since it does the same thing, can you name the windows variant `ifmode` as well, and also use uppercase for the enum?  (re-using the enum is not trivial because it comes from `ovpn_dco_linux.h` but won\u0027t be necessary, I think, as long as it\u0027s clear \"it does the same thing\").\n\nMaybe `ovpn_dco_init()` can also be modeled to be more lookalike?","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"struct dco_context {"},{"line_number":41,"context_line":"    struct tuntap *tt;"},{"line_number":42,"context_line":"    dco_mode_type mode;"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"};"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":18,"id":"4fc86de9_75204ca5","line":42,"in_reply_to":"8bc501cb_073ac40b","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"}],"src/openvpn/forward.c":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":1323,"context_line":"    }"},{"line_number":1324,"context_line":"    else"},{"line_number":1325,"context_line":"    {"},{"line_number":1326,"context_line":"        bool prepend_sa \u003d c-\u003eoptions.mode \u003d\u003d MODE_SERVER \u0026\u0026 dco_enabled(\u0026c-\u003eoptions);"},{"line_number":1327,"context_line":"        sockethandle_t sh \u003d { .is_handle \u003d true, .h \u003d c-\u003ec1.tuntap-\u003ehand, .prepend_sa \u003d prepend_sa };"},{"line_number":1328,"context_line":"        sockethandle_finalize(sh, \u0026c-\u003ec1.tuntap-\u003ereads, \u0026c-\u003ec2.buf, NULL);"},{"line_number":1329,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"c2131d8c_f342751d","line":1326,"updated":"2025-02-05 19:11:20.000000000","message":"we do have `SF_PREPEND_SA` set on the sockflags - is that available here?","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":true,"context_lines":[{"line_number":1323,"context_line":"    }"},{"line_number":1324,"context_line":"    else"},{"line_number":1325,"context_line":"    {"},{"line_number":1326,"context_line":"        bool prepend_sa \u003d c-\u003eoptions.mode \u003d\u003d MODE_SERVER \u0026\u0026 dco_enabled(\u0026c-\u003eoptions);"},{"line_number":1327,"context_line":"        sockethandle_t sh \u003d { .is_handle \u003d true, .h \u003d c-\u003ec1.tuntap-\u003ehand, .prepend_sa \u003d prepend_sa };"},{"line_number":1328,"context_line":"        sockethandle_finalize(sh, \u0026c-\u003ec1.tuntap-\u003ereads, \u0026c-\u003ec2.buf, NULL);"},{"line_number":1329,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"ea8ee09a_b0ad999b","line":1326,"in_reply_to":"c2131d8c_f342751d","updated":"2025-02-06 18:45:33.000000000","message":"Actually we cannot end up here when using DCO. So prepend_sa should be false and I will add an ASSERT(!dco_enabled(\u0026c-\u003eoptions));","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"1560972bb58e9d08b863b414092a8b897f870037","unresolved":false,"context_lines":[{"line_number":1323,"context_line":"    }"},{"line_number":1324,"context_line":"    else"},{"line_number":1325,"context_line":"    {"},{"line_number":1326,"context_line":"        bool prepend_sa \u003d c-\u003eoptions.mode \u003d\u003d MODE_SERVER \u0026\u0026 dco_enabled(\u0026c-\u003eoptions);"},{"line_number":1327,"context_line":"        sockethandle_t sh \u003d { .is_handle \u003d true, .h \u003d c-\u003ec1.tuntap-\u003ehand, .prepend_sa \u003d prepend_sa };"},{"line_number":1328,"context_line":"        sockethandle_finalize(sh, \u0026c-\u003ec1.tuntap-\u003ereads, \u0026c-\u003ec2.buf, NULL);"},{"line_number":1329,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"825741c8_e6fea2d1","line":1326,"in_reply_to":"ea8ee09a_b0ad999b","updated":"2025-02-06 18:46:54.000000000","message":"Done","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"}],"src/openvpn/ovpn_dco_win.h":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":117,"context_line":"typedef struct _OVPN_CRYPTO_DATA_V2 {"},{"line_number":118,"context_line":"    OVPN_CRYPTO_DATA V1;"},{"line_number":119,"context_line":"    UINT32 CryptoOptions;"},{"line_number":120,"context_line":"} OVPN_CRYPTO_DATA_V2, * POVPN_CRYPTO_DATA_V2;"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"typedef struct _OVPN_MP_SET_PEER {"},{"line_number":123,"context_line":"    int PeerId;"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"bd9f5732_254ace41","line":120,"updated":"2025-02-05 19:11:20.000000000","message":"these two are not part of *this* patch set, and might need revisiting for \"the new epoch thing\"","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":117,"context_line":"typedef struct _OVPN_CRYPTO_DATA_V2 {"},{"line_number":118,"context_line":"    OVPN_CRYPTO_DATA V1;"},{"line_number":119,"context_line":"    UINT32 CryptoOptions;"},{"line_number":120,"context_line":"} OVPN_CRYPTO_DATA_V2, * POVPN_CRYPTO_DATA_V2;"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"typedef struct _OVPN_MP_SET_PEER {"},{"line_number":123,"context_line":"    int PeerId;"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"98441252_eacace58","line":120,"in_reply_to":"bd9f5732_254ace41","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"}],"src/openvpn/socket.c":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":2253,"context_line":"        create_socket_dco_win(c, sock, sig_info);"},{"line_number":2254,"context_line":"        goto done;"},{"line_number":2255,"context_line":"    }"},{"line_number":2256,"context_line":"    else"},{"line_number":2257,"context_line":"#endif"},{"line_number":2258,"context_line":"    {"},{"line_number":2259,"context_line":"        if (sock-\u003einfo.lsa-\u003ecurrent_remote)"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"141b9fd2_5cf1aa60","line":2256,"updated":"2025-02-05 19:11:20.000000000","message":"since there is a \"goto done\" in the `if()` we could get rid of the `else` and the dangling brackets outside of the #endif...","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":2253,"context_line":"        create_socket_dco_win(c, sock, sig_info);"},{"line_number":2254,"context_line":"        goto done;"},{"line_number":2255,"context_line":"    }"},{"line_number":2256,"context_line":"    else"},{"line_number":2257,"context_line":"#endif"},{"line_number":2258,"context_line":"    {"},{"line_number":2259,"context_line":"        if (sock-\u003einfo.lsa-\u003ecurrent_remote)"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"9f6896eb_6e2a0bdf","line":2256,"in_reply_to":"141b9fd2_5cf1aa60","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":3854,"context_line":"            }"},{"line_number":3855,"context_line":"            memcpy(dst, sa, sizeof(struct sockaddr_in));"},{"line_number":3856,"context_line":"            buf_advance(buf, sizeof(struct sockaddr_in));"},{"line_number":3857,"context_line":"            sa_len \u003d sizeof(struct sockaddr_in);"},{"line_number":3858,"context_line":"            break;"},{"line_number":3859,"context_line":""},{"line_number":3860,"context_line":"        case AF_INET6:"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"0df307dd_57fedb84","line":3857,"updated":"2025-02-05 19:11:20.000000000","message":"the repetition of `sizeof(struct sockaddr_in)` makes my eyes hurt... what about assigning `sa_len` first and then doing `if (buf_len() \u003c sa_len)... memcpy(...sa_len)` etc?","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":3854,"context_line":"            }"},{"line_number":3855,"context_line":"            memcpy(dst, sa, sizeof(struct sockaddr_in));"},{"line_number":3856,"context_line":"            buf_advance(buf, sizeof(struct sockaddr_in));"},{"line_number":3857,"context_line":"            sa_len \u003d sizeof(struct sockaddr_in);"},{"line_number":3858,"context_line":"            break;"},{"line_number":3859,"context_line":""},{"line_number":3860,"context_line":"        case AF_INET6:"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"be0ef538_110ecee4","line":3857,"in_reply_to":"0df307dd_57fedb84","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":3864,"context_line":"            }"},{"line_number":3865,"context_line":"            memcpy(dst, sa, sizeof(struct sockaddr_in6));"},{"line_number":3866,"context_line":"            buf_advance(buf, sizeof(struct sockaddr_in6));"},{"line_number":3867,"context_line":"            sa_len \u003d sizeof(struct sockaddr_in6);"},{"line_number":3868,"context_line":"            break;"},{"line_number":3869,"context_line":""},{"line_number":3870,"context_line":"        default:"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"f9087006_6ac2ed8b","line":3867,"updated":"2025-02-05 19:11:20.000000000","message":"same here","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":false,"context_lines":[{"line_number":3864,"context_line":"            }"},{"line_number":3865,"context_line":"            memcpy(dst, sa, sizeof(struct sockaddr_in6));"},{"line_number":3866,"context_line":"            buf_advance(buf, sizeof(struct sockaddr_in6));"},{"line_number":3867,"context_line":"            sa_len \u003d sizeof(struct sockaddr_in6);"},{"line_number":3868,"context_line":"            break;"},{"line_number":3869,"context_line":""},{"line_number":3870,"context_line":"        default:"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"c8f0d980_977d5293","line":3867,"in_reply_to":"f9087006_6ac2ed8b","updated":"2025-02-06 18:45:33.000000000","message":"Acknowledged","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"fbbaeff35db272492b24595751b861586d36896b","unresolved":true,"context_lines":[{"line_number":3954,"context_line":""},{"line_number":3955,"context_line":"    if (!sh.is_handle \u0026\u0026 from)"},{"line_number":3956,"context_line":"    {"},{"line_number":3957,"context_line":"        read_sockaddr_from_overlapped(io, \u0026from-\u003edest.addr.sa, ret);"},{"line_number":3958,"context_line":"    }"},{"line_number":3959,"context_line":""},{"line_number":3960,"context_line":"    if (buf)"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"445a211f_710bf77b","line":3957,"updated":"2025-02-05 19:11:20.000000000","message":"I do not understand these two `sh.is_handle` cases.  Isn\u0027t this always a handle on windows?  Or is this the \"regular socket\" case, and only wintun + dco have `is_handle`?\n\nAlso, the conditon on `if (from)` is interesting, so if `from` happens to be NULL, we wouldn\u0027t `read_sockaddr_from_packet()` and subsequently the packet will be malformed... can it ever be NULL here?","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"06d34c764f05cf97aeae1b401f49e0c66284b349","unresolved":true,"context_lines":[{"line_number":3954,"context_line":""},{"line_number":3955,"context_line":"    if (!sh.is_handle \u0026\u0026 from)"},{"line_number":3956,"context_line":"    {"},{"line_number":3957,"context_line":"        read_sockaddr_from_overlapped(io, \u0026from-\u003edest.addr.sa, ret);"},{"line_number":3958,"context_line":"    }"},{"line_number":3959,"context_line":""},{"line_number":3960,"context_line":"    if (buf)"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"69e4d1f0_887d9531","line":3957,"in_reply_to":"445a211f_710bf77b","updated":"2025-02-06 18:45:33.000000000","message":"SH could be either file descriptor (in case of non-dco link) or handle (non-dco tun and dco link).\n\n`from` is NULL in case of non-dco tun and read tcp link - but my patch hasn\u0027t changed that.","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"1560972bb58e9d08b863b414092a8b897f870037","unresolved":false,"context_lines":[{"line_number":3954,"context_line":""},{"line_number":3955,"context_line":"    if (!sh.is_handle \u0026\u0026 from)"},{"line_number":3956,"context_line":"    {"},{"line_number":3957,"context_line":"        read_sockaddr_from_overlapped(io, \u0026from-\u003edest.addr.sa, ret);"},{"line_number":3958,"context_line":"    }"},{"line_number":3959,"context_line":""},{"line_number":3960,"context_line":"    if (buf)"}],"source_content_type":"text/x-csrc","patch_set":18,"id":"c67d8e5e_442ec891","line":3957,"in_reply_to":"69e4d1f0_887d9531","updated":"2025-02-06 18:46:54.000000000","message":"Done","commit_id":"53fceaab0377b8f8fea9da9d8c36ef4694b36467"}],"src/openvpn/socket.h":[{"author":{"_account_id":1000002,"name":"Gert Doering","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"c0790c5c09f2919802f9d20b279663ca37fcbcef","unresolved":true,"context_lines":[{"line_number":1127,"context_line":"        {"},{"line_number":1128,"context_line":"            struct sockaddr_in sa;"},{"line_number":1129,"context_line":"            memcpy(\u0026sa, \u0026to-\u003edest.addr.in4, sizeof(sa));"},{"line_number":1130,"context_line":"            buf_write_prepend(buf, \u0026sa, sizeof(sa));"},{"line_number":1131,"context_line":"        }"},{"line_number":1132,"context_line":"        else"},{"line_number":1133,"context_line":"        {"}],"source_content_type":"text/x-csrc","patch_set":20,"id":"40fb319f_4992f85a","line":1130,"updated":"2025-02-19 21:53:56.000000000","message":"I *do* wonder why this is not just doing\n\n```\nbuf_write_prepend(buf, \u0026to-\u003edest.addr.in4, sizeof(sockaddr_in);\n```\n\n... but it works as it is, and I want #815 done...","commit_id":"33a95351b3218766635351c69e25cf34394bfe7e"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"7a81d840906dedbcca54f5c4660bb3779c3b2fb2","unresolved":true,"context_lines":[{"line_number":1127,"context_line":"        {"},{"line_number":1128,"context_line":"            struct sockaddr_in sa;"},{"line_number":1129,"context_line":"            memcpy(\u0026sa, \u0026to-\u003edest.addr.in4, sizeof(sa));"},{"line_number":1130,"context_line":"            buf_write_prepend(buf, \u0026sa, sizeof(sa));"},{"line_number":1131,"context_line":"        }"},{"line_number":1132,"context_line":"        else"},{"line_number":1133,"context_line":"        {"}],"source_content_type":"text/x-csrc","patch_set":20,"id":"fc6cf011_d31d4dd0","line":1130,"in_reply_to":"40fb319f_4992f85a","updated":"2025-02-20 06:12:29.000000000","message":"Right, don\u0027t know why I needed this temporary buffer. Do you want me to send v21 or shall I send a follow-up patch?","commit_id":"33a95351b3218766635351c69e25cf34394bfe7e"}]}
