Fix hashmap access in direct_assign.py

This commit is contained in:
Pragyansh Chaturvedi
2025-10-04 02:14:33 +05:30
parent af44bd063c
commit ac49cd8b1c

View File

@ -26,12 +26,12 @@ def count() -> HashMap:
@bpf
@section("xdp")
def hello_world(ctx: c_void_p) -> c_int64:
prev = count().lookup(0)
prev = count.lookup(0)
if prev:
count().update(0, prev + 1)
count.update(0, prev + 1)
return XDP_PASS
else:
count().update(0, 1)
count.update(0, 1)
return XDP_PASS