)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"86ac0cc9158ef3ed5ef1fe0a3910c48ffee702a3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"e565e677_e2d2920e","updated":"2024-12-27 18:32:47.000000000","message":"Nitpicks about comments, code looks good to me.","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"}],"src/openvpn/packet_id.c":[{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"582fd9837d493f450cbd5ddb68b154945b4c8319","unresolved":true,"context_lines":[{"line_number":664,"context_line":"    /* top most 16 bits */"},{"line_number":665,"context_line":"    uint16_t epoch \u003d id \u003e\u003e 48;"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    pin-\u003eid \u003d id \u0026 0xffffffffffffull;"},{"line_number":668,"context_line":"    return epoch;"},{"line_number":669,"context_line":"}"},{"line_number":670,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"72c0412e_6dab8a3e","line":667,"updated":"2024-11-25 13:09:11.000000000","message":"shouldn\u0027t we use PACKET_ID_EPOCH_MAX here?","commit_id":"effbadd3f2e2bca38f4d2452223c4b40852b8702"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"1eaf868ca5b3e5a058a567368381fc88a3c0dbe1","unresolved":false,"context_lines":[{"line_number":664,"context_line":"    /* top most 16 bits */"},{"line_number":665,"context_line":"    uint16_t epoch \u003d id \u003e\u003e 48;"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    pin-\u003eid \u003d id \u0026 0xffffffffffffull;"},{"line_number":668,"context_line":"    return epoch;"},{"line_number":669,"context_line":"}"},{"line_number":670,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"feb6ca8b_77e908f0","line":667,"in_reply_to":"72c0412e_6dab8a3e","updated":"2024-11-30 13:06:25.000000000","message":"yes, will fix that. Technically it is a mask here but the mask is identical.","commit_id":"effbadd3f2e2bca38f4d2452223c4b40852b8702"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1e1a64542a7b34462ca05b52cb365d90c25e1afb","unresolved":true,"context_lines":[{"line_number":681,"context_line":"     *"},{"line_number":682,"context_line":"     * Next 48 bits are the per-epoch packet id counter. Since we are"},{"line_number":683,"context_line":"     * writing a big endian counter, the last 6 bytes of the 64 bit"},{"line_number":684,"context_line":"     * integer contain our counter but the upper two bytes are always 0 */"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    uint64_t net_id \u003d ((uint64_t) epoch) \u003c\u003c 48 | p-\u003eid;"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":8,"id":"7a433205_650c3d7a","line":684,"updated":"2024-12-27 16:25:24.000000000","message":"This is confusing. The point where we convert to network order the epoch is already joined, so the bytes aren\u0027t 0, are they?","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"6669592b6578fa0cf2a118a78dd4dbfeb88358dd","unresolved":false,"context_lines":[{"line_number":681,"context_line":"     *"},{"line_number":682,"context_line":"     * Next 48 bits are the per-epoch packet id counter. Since we are"},{"line_number":683,"context_line":"     * writing a big endian counter, the last 6 bytes of the 64 bit"},{"line_number":684,"context_line":"     * integer contain our counter but the upper two bytes are always 0 */"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    uint64_t net_id \u003d ((uint64_t) epoch) \u003c\u003c 48 | p-\u003eid;"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":8,"id":"3a7675bb_c3f00413","line":684,"in_reply_to":"7a433205_650c3d7a","updated":"2024-12-27 18:17:30.000000000","message":"Done","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"}],"src/openvpn/packet_id.h":[{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1e1a64542a7b34462ca05b52cb365d90c25e1afb","unresolved":true,"context_lines":[{"line_number":46,"context_line":"typedef uint32_t packet_id_type;"},{"line_number":47,"context_line":"#define PACKET_ID_MAX        UINT32_MAX"},{"line_number":48,"context_line":"#define PACKET_ID_EPOCH_MAX  0x0000ffffffffffffull"},{"line_number":49,"context_line":"/** Maks of the bits that make out the epoch in the packet counter */"},{"line_number":50,"context_line":"#define PACKET_ID_MASK       0x0000ffffffffffffull"},{"line_number":51,"context_line":"typedef uint32_t net_time_t;"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":8,"id":"1049acea_ac1fd539","line":49,"updated":"2024-12-27 16:25:24.000000000","message":"\"Maks\" -\u003e \"Mask\". \"make out\" -\u003e \"masks out\"?","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"86ac0cc9158ef3ed5ef1fe0a3910c48ffee702a3","unresolved":true,"context_lines":[{"line_number":46,"context_line":"typedef uint32_t packet_id_type;"},{"line_number":47,"context_line":"#define PACKET_ID_MAX        UINT32_MAX"},{"line_number":48,"context_line":"#define PACKET_ID_EPOCH_MAX  0x0000ffffffffffffull"},{"line_number":49,"context_line":"/** Maks of the bits that make out the epoch in the packet counter */"},{"line_number":50,"context_line":"#define PACKET_ID_MASK       0x0000ffffffffffffull"},{"line_number":51,"context_line":"typedef uint32_t net_time_t;"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":8,"id":"c836da37_30744229","line":49,"range":{"start_line":49,"start_character":4,"end_line":49,"end_character":8},"updated":"2024-12-27 18:32:47.000000000","message":"Mask","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"6669592b6578fa0cf2a118a78dd4dbfeb88358dd","unresolved":false,"context_lines":[{"line_number":46,"context_line":"typedef uint32_t packet_id_type;"},{"line_number":47,"context_line":"#define PACKET_ID_MAX        UINT32_MAX"},{"line_number":48,"context_line":"#define PACKET_ID_EPOCH_MAX  0x0000ffffffffffffull"},{"line_number":49,"context_line":"/** Maks of the bits that make out the epoch in the packet counter */"},{"line_number":50,"context_line":"#define PACKET_ID_MASK       0x0000ffffffffffffull"},{"line_number":51,"context_line":"typedef uint32_t net_time_t;"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":8,"id":"f34723d4_5781004e","line":49,"in_reply_to":"1049acea_ac1fd539","updated":"2024-12-27 18:17:30.000000000","message":"Done","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"96b52a15287f6b337e5ade7ae34f8a231f848146","unresolved":false,"context_lines":[{"line_number":46,"context_line":"typedef uint32_t packet_id_type;"},{"line_number":47,"context_line":"#define PACKET_ID_MAX        UINT32_MAX"},{"line_number":48,"context_line":"#define PACKET_ID_EPOCH_MAX  0x0000ffffffffffffull"},{"line_number":49,"context_line":"/** Maks of the bits that make out the epoch in the packet counter */"},{"line_number":50,"context_line":"#define PACKET_ID_MASK       0x0000ffffffffffffull"},{"line_number":51,"context_line":"typedef uint32_t net_time_t;"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":8,"id":"3292ddf7_01d6cdee","line":49,"range":{"start_line":49,"start_character":4,"end_line":49,"end_character":8},"in_reply_to":"c836da37_30744229","updated":"2024-12-27 18:34:57.000000000","message":"Fixed while I had the tab open","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"86ac0cc9158ef3ed5ef1fe0a3910c48ffee702a3","unresolved":true,"context_lines":[{"line_number":328,"context_line":"/**"},{"line_number":329,"context_line":" * Writes the packet ID containing both the epoch and the packet id to the"},{"line_number":330,"context_line":" * buffer specified by buf."},{"line_number":331,"context_line":" * @param p         packed id send structure to use for the packet id"},{"line_number":332,"context_line":" * @param epoch     epoch to write to the packet"},{"line_number":333,"context_line":" * @param buf       buffer to write the packet id/epcoh to"},{"line_number":334,"context_line":" * @return          false if the packet id space is exhausted and cannot be written"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"ecbf03a7_cb2058dd","line":331,"range":{"start_line":331,"start_character":20,"end_line":331,"end_character":26},"updated":"2024-12-27 18:32:47.000000000","message":"I\u0027m thinking this is a typo. Or is it actually a packed struct?","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"de359131d5a02c0c0ab4d44ff37963d3cbe272f5","unresolved":false,"context_lines":[{"line_number":328,"context_line":"/**"},{"line_number":329,"context_line":" * Writes the packet ID containing both the epoch and the packet id to the"},{"line_number":330,"context_line":" * buffer specified by buf."},{"line_number":331,"context_line":" * @param p         packed id send structure to use for the packet id"},{"line_number":332,"context_line":" * @param epoch     epoch to write to the packet"},{"line_number":333,"context_line":" * @param buf       buffer to write the packet id/epcoh to"},{"line_number":334,"context_line":" * @return          false if the packet id space is exhausted and cannot be written"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"d417abd6_3a14c47d","line":331,"range":{"start_line":331,"start_character":20,"end_line":331,"end_character":26},"in_reply_to":"ecbf03a7_cb2058dd","updated":"2025-01-04 22:49:22.000000000","message":"typo. Will fix.","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"1e1a64542a7b34462ca05b52cb365d90c25e1afb","unresolved":true,"context_lines":[{"line_number":330,"context_line":" * buffer specified by buf."},{"line_number":331,"context_line":" * @param p         packed id send structure to use for the packet id"},{"line_number":332,"context_line":" * @param epoch     epoch to write to the packet"},{"line_number":333,"context_line":" * @param buf       buffer to write the packet id/epcoh to"},{"line_number":334,"context_line":" * @return          false if the packet id space is exhausted and cannot be written"},{"line_number":335,"context_line":" */"},{"line_number":336,"context_line":"bool"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"8ca67c36_92924ef3","line":333,"updated":"2024-12-27 16:25:24.000000000","message":"\"epoch\"","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"86ac0cc9158ef3ed5ef1fe0a3910c48ffee702a3","unresolved":true,"context_lines":[{"line_number":330,"context_line":" * buffer specified by buf."},{"line_number":331,"context_line":" * @param p         packed id send structure to use for the packet id"},{"line_number":332,"context_line":" * @param epoch     epoch to write to the packet"},{"line_number":333,"context_line":" * @param buf       buffer to write the packet id/epcoh to"},{"line_number":334,"context_line":" * @return          false if the packet id space is exhausted and cannot be written"},{"line_number":335,"context_line":" */"},{"line_number":336,"context_line":"bool"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"8101af1b_44e6d50f","line":333,"range":{"start_line":333,"start_character":50,"end_line":333,"end_character":55},"updated":"2024-12-27 18:32:47.000000000","message":"epoch","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"96b52a15287f6b337e5ade7ae34f8a231f848146","unresolved":false,"context_lines":[{"line_number":330,"context_line":" * buffer specified by buf."},{"line_number":331,"context_line":" * @param p         packed id send structure to use for the packet id"},{"line_number":332,"context_line":" * @param epoch     epoch to write to the packet"},{"line_number":333,"context_line":" * @param buf       buffer to write the packet id/epcoh to"},{"line_number":334,"context_line":" * @return          false if the packet id space is exhausted and cannot be written"},{"line_number":335,"context_line":" */"},{"line_number":336,"context_line":"bool"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"6c8294d2_e55fc9fd","line":333,"range":{"start_line":333,"start_character":50,"end_line":333,"end_character":55},"in_reply_to":"8101af1b_44e6d50f","updated":"2024-12-27 18:34:57.000000000","message":"Fixed while I had the tab open","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"6669592b6578fa0cf2a118a78dd4dbfeb88358dd","unresolved":false,"context_lines":[{"line_number":330,"context_line":" * buffer specified by buf."},{"line_number":331,"context_line":" * @param p         packed id send structure to use for the packet id"},{"line_number":332,"context_line":" * @param epoch     epoch to write to the packet"},{"line_number":333,"context_line":" * @param buf       buffer to write the packet id/epcoh to"},{"line_number":334,"context_line":" * @return          false if the packet id space is exhausted and cannot be written"},{"line_number":335,"context_line":" */"},{"line_number":336,"context_line":"bool"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"6fc94b17_3cb2fa5b","line":333,"in_reply_to":"8ca67c36_92924ef3","updated":"2024-12-27 18:17:30.000000000","message":"Done","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"}],"tests/unit_tests/openvpn/test_packet_id.c":[{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"86ac0cc9158ef3ed5ef1fe0a3910c48ffee702a3","unresolved":true,"context_lines":[{"line_number":238,"context_line":"    uint8_t expected_header_48[8] \u003d { 0xff, 0xfe, 0xfa, 0x07, 0x9a, 0xb9, 0xd2, 0xe9};"},{"line_number":239,"context_line":"    assert_memory_equal(BPTR(\u0026buf_48), expected_header_48, 8);"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    /* test writing/checking the 48 bit overflow */"},{"line_number":242,"context_line":"    data-\u003epis.id \u003d 0xfffffffffffe;"},{"line_number":243,"context_line":"    struct buffer buf_of \u003d alloc_buf_gc(128, \u0026data-\u003egc);"},{"line_number":244,"context_line":"    assert_true(packet_id_write_epoch(\u0026data-\u003epis, 0xf00f, \u0026buf_of));"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"230d5a2f_40d775b3","line":241,"range":{"start_line":241,"start_character":4,"end_line":241,"end_character":51},"updated":"2024-12-27 18:32:47.000000000","message":"I don\u0027t get it, what overflow?","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"de359131d5a02c0c0ab4d44ff37963d3cbe272f5","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    uint8_t expected_header_48[8] \u003d { 0xff, 0xfe, 0xfa, 0x07, 0x9a, 0xb9, 0xd2, 0xe9};"},{"line_number":239,"context_line":"    assert_memory_equal(BPTR(\u0026buf_48), expected_header_48, 8);"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    /* test writing/checking the 48 bit overflow */"},{"line_number":242,"context_line":"    data-\u003epis.id \u003d 0xfffffffffffe;"},{"line_number":243,"context_line":"    struct buffer buf_of \u003d alloc_buf_gc(128, \u0026data-\u003egc);"},{"line_number":244,"context_line":"    assert_true(packet_id_write_epoch(\u0026data-\u003epis, 0xf00f, \u0026buf_of));"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"9930dda9_9f758def","line":241,"range":{"start_line":241,"start_character":4,"end_line":241,"end_character":51},"in_reply_to":"230d5a2f_40d775b3","updated":"2025-01-04 22:49:22.000000000","message":"Epoch packet counter is max 48 bit. This is 2**48-1. Will extend the comment.","commit_id":"93715c8890cd6ebab4852188a475a09946791e87"}]}
