Commit 5e1ff89
committed
fix(ebpf): relax MySQL split header length check
When MySQL packet header is read separately, prev_count == 4 means the
4-byte MySQL header has already been cached and the current buffer starts
from the payload.
The packet payload length in the MySQL header does not necessarily equal
the current syscall read/write length. Requiring len == count may cause
valid split packets to skip MySQL inference.
Remove this strict check and always parse seq from the cached header and
command bytes from the current payload buffer in the prev_count == 4 path.
The later full packet length validation is still kept for initial protocol
confirmation.1 parent 579c1c9 commit 5e1ff89
1 file changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
778 | 776 | | |
779 | 777 | | |
780 | 778 | | |
| |||
0 commit comments