)]}'
{"/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":"1ffb178dd6f93ffceaa0cafe4d0fb13a375ea0cb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"81bdcb1a_80c10820","updated":"2026-11-03 14:10:59.000000000","message":"Strictly speaking correct, but maybe we can clean this up a bit more?","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"}],"src/openvpn/route.c":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1ffb178dd6f93ffceaa0cafe4d0fb13a375ea0cb","unresolved":true,"context_lines":[{"line_number":3333,"context_line":"    int rtm_addrs;"},{"line_number":3334,"context_line":"    struct sockaddr so_dst, so_mask;"},{"line_number":3335,"context_line":"    char *cp \u003d m_rtmsg.m_space;"},{"line_number":3336,"context_line":"    const struct sockaddr *gate \u003d NULL, *ifp \u003d NULL, *sa;"},{"line_number":3337,"context_line":"    struct rt_msghdr *rtm_aux;"},{"line_number":3338,"context_line":""},{"line_number":3339,"context_line":"#define rtm m_rtmsg.m_rtm"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"373849c7_ad9db057","line":3336,"updated":"2026-11-03 14:10:59.000000000","message":"I would move at least the definition of sa down to the first use.","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"762ea154b48e24421428521f5b8ed035c892e391","unresolved":false,"context_lines":[{"line_number":3333,"context_line":"    int rtm_addrs;"},{"line_number":3334,"context_line":"    struct sockaddr so_dst, so_mask;"},{"line_number":3335,"context_line":"    char *cp \u003d m_rtmsg.m_space;"},{"line_number":3336,"context_line":"    const struct sockaddr *gate \u003d NULL, *ifp \u003d NULL, *sa;"},{"line_number":3337,"context_line":"    struct rt_msghdr *rtm_aux;"},{"line_number":3338,"context_line":""},{"line_number":3339,"context_line":"#define rtm m_rtmsg.m_rtm"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"dab3f781_ec4e21b2","line":3336,"in_reply_to":"373849c7_ad9db057","updated":"2026-11-11 13:41:55.000000000","message":"Done","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1ffb178dd6f93ffceaa0cafe4d0fb13a375ea0cb","unresolved":true,"context_lines":[{"line_number":3406,"context_line":"        {"},{"line_number":3407,"context_line":"            if (i \u0026 rtm_aux-\u003ertm_addrs)"},{"line_number":3408,"context_line":"            {"},{"line_number":3409,"context_line":"                sa \u003d (struct sockaddr *)cp;"},{"line_number":3410,"context_line":"                if (i \u003d\u003d RTA_GATEWAY)"},{"line_number":3411,"context_line":"                {"},{"line_number":3412,"context_line":"                    gate \u003d sa;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"68ee0b99_f8815ce7","line":3409,"updated":"2026-11-03 14:10:59.000000000","message":"use the const also in the cast?","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"762ea154b48e24421428521f5b8ed035c892e391","unresolved":false,"context_lines":[{"line_number":3406,"context_line":"        {"},{"line_number":3407,"context_line":"            if (i \u0026 rtm_aux-\u003ertm_addrs)"},{"line_number":3408,"context_line":"            {"},{"line_number":3409,"context_line":"                sa \u003d (struct sockaddr *)cp;"},{"line_number":3410,"context_line":"                if (i \u003d\u003d RTA_GATEWAY)"},{"line_number":3411,"context_line":"                {"},{"line_number":3412,"context_line":"                    gate \u003d sa;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"8a870273_781e1522","line":3409,"in_reply_to":"68ee0b99_f8815ce7","updated":"2026-11-11 13:41:55.000000000","message":"Done","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1ffb178dd6f93ffceaa0cafe4d0fb13a375ea0cb","unresolved":true,"context_lines":[{"line_number":3425,"context_line":"    }"},{"line_number":3426,"context_line":""},{"line_number":3427,"context_line":"    /* get gateway addr and interface name */"},{"line_number":3428,"context_line":"    if (gate !\u003d NULL)"},{"line_number":3429,"context_line":"    {"},{"line_number":3430,"context_line":"        /* get default gateway addr */"},{"line_number":3431,"context_line":"        rgi-\u003egateway.addr \u003d ntohl(((struct sockaddr_in *)gate)-\u003esin_addr.s_addr);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"458e2a30_073889a7","line":3428,"updated":"2026-11-03 14:10:59.000000000","message":"For gate we use !\u003d NULL and for ifp we use `if (ifp)`. Very inconsistent.","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"762ea154b48e24421428521f5b8ed035c892e391","unresolved":false,"context_lines":[{"line_number":3425,"context_line":"    }"},{"line_number":3426,"context_line":""},{"line_number":3427,"context_line":"    /* get gateway addr and interface name */"},{"line_number":3428,"context_line":"    if (gate !\u003d NULL)"},{"line_number":3429,"context_line":"    {"},{"line_number":3430,"context_line":"        /* get default gateway addr */"},{"line_number":3431,"context_line":"        rgi-\u003egateway.addr \u003d ntohl(((struct sockaddr_in *)gate)-\u003esin_addr.s_addr);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"2e37895e_e3b4604e","line":3428,"in_reply_to":"458e2a30_073889a7","updated":"2026-11-11 13:41:55.000000000","message":"Done","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1ffb178dd6f93ffceaa0cafe4d0fb13a375ea0cb","unresolved":true,"context_lines":[{"line_number":3428,"context_line":"    if (gate !\u003d NULL)"},{"line_number":3429,"context_line":"    {"},{"line_number":3430,"context_line":"        /* get default gateway addr */"},{"line_number":3431,"context_line":"        rgi-\u003egateway.addr \u003d ntohl(((struct sockaddr_in *)gate)-\u003esin_addr.s_addr);"},{"line_number":3432,"context_line":"        if (rgi-\u003egateway.addr)"},{"line_number":3433,"context_line":"        {"},{"line_number":3434,"context_line":"            rgi-\u003eflags |\u003d RGI_ADDR_DEFINED;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"04eae770_c0099e0d","line":3431,"updated":"2026-11-03 14:10:59.000000000","message":"since gate is only used once as a sockaddr_in, maybe it should be one directly?","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"762ea154b48e24421428521f5b8ed035c892e391","unresolved":false,"context_lines":[{"line_number":3428,"context_line":"    if (gate !\u003d NULL)"},{"line_number":3429,"context_line":"    {"},{"line_number":3430,"context_line":"        /* get default gateway addr */"},{"line_number":3431,"context_line":"        rgi-\u003egateway.addr \u003d ntohl(((struct sockaddr_in *)gate)-\u003esin_addr.s_addr);"},{"line_number":3432,"context_line":"        if (rgi-\u003egateway.addr)"},{"line_number":3433,"context_line":"        {"},{"line_number":3434,"context_line":"            rgi-\u003eflags |\u003d RGI_ADDR_DEFINED;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"96da2ca0_c669862f","line":3431,"in_reply_to":"04eae770_c0099e0d","updated":"2026-11-11 13:41:55.000000000","message":"Changed type of both ifp (replaced by adl) and gate.","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1ffb178dd6f93ffceaa0cafe4d0fb13a375ea0cb","unresolved":true,"context_lines":[{"line_number":3437,"context_line":"        if (ifp)"},{"line_number":3438,"context_line":"        {"},{"line_number":3439,"context_line":"            /* get interface name */"},{"line_number":3440,"context_line":"            const struct sockaddr_dl *adl \u003d (struct sockaddr_dl *)ifp;"},{"line_number":3441,"context_line":"            if (adl-\u003esdl_nlen \u0026\u0026 adl-\u003esdl_nlen \u003c sizeof(rgi-\u003eiface))"},{"line_number":3442,"context_line":"            {"},{"line_number":3443,"context_line":"                memcpy(rgi-\u003eiface, adl-\u003esdl_data, adl-\u003esdl_nlen);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"40fd93a4_471fdced","line":3440,"updated":"2026-11-03 14:10:59.000000000","message":"also use the const in the cast here?\n\nmake ifp a sockaddr_dl directly?","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"},{"author":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"762ea154b48e24421428521f5b8ed035c892e391","unresolved":false,"context_lines":[{"line_number":3437,"context_line":"        if (ifp)"},{"line_number":3438,"context_line":"        {"},{"line_number":3439,"context_line":"            /* get interface name */"},{"line_number":3440,"context_line":"            const struct sockaddr_dl *adl \u003d (struct sockaddr_dl *)ifp;"},{"line_number":3441,"context_line":"            if (adl-\u003esdl_nlen \u0026\u0026 adl-\u003esdl_nlen \u003c sizeof(rgi-\u003eiface))"},{"line_number":3442,"context_line":"            {"},{"line_number":3443,"context_line":"                memcpy(rgi-\u003eiface, adl-\u003esdl_data, adl-\u003esdl_nlen);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"27c2c099_d217562a","line":3440,"in_reply_to":"40fd93a4_471fdced","updated":"2026-11-11 13:41:55.000000000","message":"Yes. remove ifp and directly assiging adl with a cast.","commit_id":"51425676a1171e901b3d515c34dc11fa4eeb3abe"}]}
