summaryrefslogtreecommitdiff
path: root/bpf_parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'bpf_parser.y')
-rw-r--r--bpf_parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/bpf_parser.y b/bpf_parser.y
index 0bbc17d..19268ae 100644
--- a/bpf_parser.y
+++ b/bpf_parser.y
@@ -354,6 +354,8 @@ ldxi
ldx
: OP_LDX '#' number {
set_curr_instr(BPF_LDX | BPF_IMM, 0, 0, $3); }
+ | OP_LDX K_PKT_LEN {
+ set_curr_instr(BPF_LDX | BPF_W | BPF_LEN, 0, 0, 0); }
| OP_LDX 'M' '[' number ']' {
set_curr_instr(BPF_LDX | BPF_MEM, 0, 0, $4); }
| OP_LDXB number '*' '(' '[' number ']' '&' number ')' {