)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"1e20a91c760215b67aa3fbbb9f65a6d29b1afc07","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b5a932ce_2a9cc92e","updated":"2025-03-06 14:42:34.000000000","message":"only looked very briefly, but we must avoid doing extra mallocs (gc_arena) for every single packet","commit_id":"6c2f192b0da338460f7ced6cd19270fcb8f0205e"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"9c5af6ee24f89ef055e371ba77dac3efbb07a134","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"989df293_1cf5a9fd","updated":"2025-10-11 11:01:42.000000000","message":"close :-) - one code rearrangement, one comment (in two places), then this can move on.\n\nI have tested it, and the main difference is \"it logs more\"... but with some policy routing twists, we could end up at a setup where it makes a difference.","commit_id":"aae9ce3fa62c34c1af0c7b1682b8955dd003b62d"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"e9116deae861d74858498e63fb32b5f402d1fdbf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"22c76cf9_a4ff45c6","updated":"2025-10-11 11:44:49.000000000","message":"Done!","commit_id":"f8cb60170322205ab189a2550c83713312bcc1a9"}],"src/openvpn/forward.c":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"1e20a91c760215b67aa3fbbb9f65a6d29b1afc07","unresolved":true,"context_lines":[{"line_number":1386,"context_line":"static void"},{"line_number":1387,"context_line":"drop_if_recursive_routing(struct context *c, struct buffer *buf)"},{"line_number":1388,"context_line":"{"},{"line_number":1389,"context_line":"    struct gc_arena gc \u003d gc_new();"},{"line_number":1390,"context_line":""},{"line_number":1391,"context_line":"    if (c-\u003ec2.to_link_addr \u003d\u003d NULL) /* no remote addr known */"},{"line_number":1392,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"507ab496_f0c079fb","line":1389,"updated":"2025-03-06 14:42:34.000000000","message":"this is in the \"for every packet\" path, so we should not allocate gc_arenas if we do not need them (which is why it was only in the \"print\" part so far)","commit_id":"6c2f192b0da338460f7ced6cd19270fcb8f0205e"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"3d201f97af438aa3f915fd5e73177a37426b956f","unresolved":true,"context_lines":[{"line_number":1386,"context_line":"static void"},{"line_number":1387,"context_line":"drop_if_recursive_routing(struct context *c, struct buffer *buf)"},{"line_number":1388,"context_line":"{"},{"line_number":1389,"context_line":"    struct gc_arena gc \u003d gc_new();"},{"line_number":1390,"context_line":""},{"line_number":1391,"context_line":"    if (c-\u003ec2.to_link_addr \u003d\u003d NULL) /* no remote addr known */"},{"line_number":1392,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"729d6076_8f9866f2","line":1389,"in_reply_to":"507ab496_f0c079fb","updated":"2025-03-06 14:55:04.000000000","message":"Oh yes, indeed.","commit_id":"6c2f192b0da338460f7ced6cd19270fcb8f0205e"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"ba452fff37088cbca8ea7ccd6f53c10b31a97d85","unresolved":false,"context_lines":[{"line_number":1386,"context_line":"static void"},{"line_number":1387,"context_line":"drop_if_recursive_routing(struct context *c, struct buffer *buf)"},{"line_number":1388,"context_line":"{"},{"line_number":1389,"context_line":"    struct gc_arena gc \u003d gc_new();"},{"line_number":1390,"context_line":""},{"line_number":1391,"context_line":"    if (c-\u003ec2.to_link_addr \u003d\u003d NULL) /* no remote addr known */"},{"line_number":1392,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"838f2ea0_084c8df2","line":1389,"in_reply_to":"729d6076_8f9866f2","updated":"2025-03-06 15:05:27.000000000","message":"Acknowledged","commit_id":"6c2f192b0da338460f7ced6cd19270fcb8f0205e"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"9c5af6ee24f89ef055e371ba77dac3efbb07a134","unresolved":true,"context_lines":[{"line_number":1424,"context_line":"        if (link_addr-\u003eaddr.sa.sa_family !\u003d AF_INET)"},{"line_number":1425,"context_line":"        {"},{"line_number":1426,"context_line":"            return;"},{"line_number":1427,"context_line":"        }"},{"line_number":1428,"context_line":""},{"line_number":1429,"context_line":"        /* drop packets with same dest addr and port as remote */"},{"line_number":1430,"context_line":"        uint8_t *l4_hdr \u003d (uint8_t *)pip + sizeof(struct openvpn_iphdr);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"72c2ad29_60c1bde2","line":1427,"updated":"2025-10-11 11:01:42.000000000","message":"This one should go up where it was, before the `openvpn_iphdr *pip` assignment (because we do not need to look for \"proto\" if we already know the AFI is different).\n\nFor IPv6, the old order has been kept...","commit_id":"aae9ce3fa62c34c1af0c7b1682b8955dd003b62d"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"e9116deae861d74858498e63fb32b5f402d1fdbf","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"        if (link_addr-\u003eaddr.sa.sa_family !\u003d AF_INET)"},{"line_number":1425,"context_line":"        {"},{"line_number":1426,"context_line":"            return;"},{"line_number":1427,"context_line":"        }"},{"line_number":1428,"context_line":""},{"line_number":1429,"context_line":"        /* drop packets with same dest addr and port as remote */"},{"line_number":1430,"context_line":"        uint8_t *l4_hdr \u003d (uint8_t *)pip + sizeof(struct openvpn_iphdr);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"c9143714_87c18b72","line":1427,"in_reply_to":"72c2ad29_60c1bde2","updated":"2025-10-11 11:44:49.000000000","message":"Done","commit_id":"aae9ce3fa62c34c1af0c7b1682b8955dd003b62d"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"9c5af6ee24f89ef055e371ba77dac3efbb07a134","unresolved":true,"context_lines":[{"line_number":1429,"context_line":"        /* drop packets with same dest addr and port as remote */"},{"line_number":1430,"context_line":"        uint8_t *l4_hdr \u003d (uint8_t *)pip + sizeof(struct openvpn_iphdr);"},{"line_number":1431,"context_line":"        uint16_t src_port \u003d ntohs(*(uint16_t *)l4_hdr);"},{"line_number":1432,"context_line":"        uint16_t dst_port \u003d ntohs(*(uint16_t *)(l4_hdr + sizeof(uint16_t)));"},{"line_number":1433,"context_line":"        if ((memcmp(\u0026link_addr-\u003eaddr.in4.sin_addr.s_addr, \u0026pip-\u003edaddr, sizeof(pip-\u003edaddr)) \u003d\u003d 0) \u0026\u0026 (link_port \u003d\u003d dst_port))"},{"line_number":1434,"context_line":"        {"},{"line_number":1435,"context_line":"            c-\u003ec2.buf.len \u003d 0;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"18f831f2_47078c77","line":1432,"updated":"2025-10-11 11:01:42.000000000","message":"while at it, maybe add a comment about \"TCP and UDP ports are at the same place in the header, and other protocols can not happen here due to the lsi-\u003eproto check above\"?  Because my first thought was \"why is he not using openvpn_tcphdr here?\"...","commit_id":"aae9ce3fa62c34c1af0c7b1682b8955dd003b62d"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"e9116deae861d74858498e63fb32b5f402d1fdbf","unresolved":false,"context_lines":[{"line_number":1429,"context_line":"        /* drop packets with same dest addr and port as remote */"},{"line_number":1430,"context_line":"        uint8_t *l4_hdr \u003d (uint8_t *)pip + sizeof(struct openvpn_iphdr);"},{"line_number":1431,"context_line":"        uint16_t src_port \u003d ntohs(*(uint16_t *)l4_hdr);"},{"line_number":1432,"context_line":"        uint16_t dst_port \u003d ntohs(*(uint16_t *)(l4_hdr + sizeof(uint16_t)));"},{"line_number":1433,"context_line":"        if ((memcmp(\u0026link_addr-\u003eaddr.in4.sin_addr.s_addr, \u0026pip-\u003edaddr, sizeof(pip-\u003edaddr)) \u003d\u003d 0) \u0026\u0026 (link_port \u003d\u003d dst_port))"},{"line_number":1434,"context_line":"        {"},{"line_number":1435,"context_line":"            c-\u003ec2.buf.len \u003d 0;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"e5c4d8eb_9f9a10f0","line":1432,"in_reply_to":"18f831f2_47078c77","updated":"2025-10-11 11:44:49.000000000","message":"Done","commit_id":"aae9ce3fa62c34c1af0c7b1682b8955dd003b62d"}]}
