)]}'
{
  "commit": "0c0a1dfe57cd9ecd3533fcde7f27d35a4757cc98",
  "tree": "20a4fcf8c30d097c2c7d13bcabe465a95dac1e68",
  "parents": [
    "1b902022e4e8344fa1bebe63e68fbf5a073482d8"
  ],
  "author": {
    "name": "Aleksei Bavshin",
    "email": "a.bavshin@f5.com",
    "time": "Mon May 23 11:29:44 2022 -0700"
  },
  "committer": {
    "name": "Aleksei Bavshin",
    "email": "a.bavshin@f5.com",
    "time": "Mon May 23 11:29:44 2022 -0700"
  },
  "message": "Stream: don\u0027t flush empty buffers created for read errors.\n\nWhen we generate the last_buf buffer for an UDP upstream recv error, it does\nnot contain any data from the wire. ngx_stream_write_filter attempts to forward\nit anyways, which is incorrect (e.g., UDP upstream ECONNREFUSED will be\ntranslated to an empty packet).\n\nThis happens because we mark the buffer as both \u0027flush\u0027 and \u0027last_buf\u0027, and\nngx_stream_write_filter has special handling for flush with certain types of\nconnections (see d127837c714f, 32b0ba4855a6).  The flags are meant to be\nmutually exclusive, so the fix is to ensure that flush and last_buf are not set\nat the same time.\n\nReproduction:\n\nstream {\n    upstream unreachable {\n        server     127.0.0.1:8880;\n    }\n    server {\n        listen     127.0.0.1:8998 udp;\n        proxy_pass unreachable;\n    }\n}\n\n1 0.000000000    127.0.0.1 → 127.0.0.1    UDP 47 45588 → 8998 Len\u003d5\n2 0.000166300    127.0.0.1 → 127.0.0.1    UDP 47 51149 → 8880 Len\u003d5\n3 0.000172600    127.0.0.1 → 127.0.0.1    ICMP 75 Destination unreachable (Port\nunreachable)\n4 0.000202400    127.0.0.1 → 127.0.0.1    UDP 42 8998 → 45588 Len\u003d0\n\nFixes d127837c714f.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "683f7d7a4de9703e8c22c77a9c75b5c8cb928201",
      "old_mode": 33188,
      "old_path": "src/stream/ngx_stream_proxy_module.c",
      "new_id": "bd462ff01e1559564e2831593c1315d3498a3c67",
      "new_mode": 33188,
      "new_path": "src/stream/ngx_stream_proxy_module.c"
    }
  ]
}
