Commit 62b8080
authored
Update buffer position when returning kIgnored (#1760)
Summary: This PR removes the frame's contents from the buffer in the
case we return `kIgnored` when the frame is a type (opcode) we do not
parse. When running the BPF test we noticed that the program would stall
when the parser encountered a frame with an opcode it does not support.
This was due to to the parser returning `kIgnored` to `ParseFramesLoop`
and it not moving the buffer forward before calling `ParseFrame` again.
This change will update the buffer position before returning `kIgnored`
to `ParseFramesLoop` so that the remaining frames in the buffer can be
parsed.
Related issues: #640
Type of change: /kind bug
Test Plan: Modified the existing test checking for the unsupported
opcode type.
Signed-off-by: Kartik Pattaswamy <kpattaswamy@pixielabs.ai>1 parent e6bfab7 commit 62b8080
File tree
2 files changed
+5
-3
lines changed- src/stirling/source_connectors/socket_tracer/protocols/mongodb
2 files changed
+5
-3
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
| |||
0 commit comments