Skip to content

Commit 10c3540

Browse files
author
Ian Seyler
committed
Add check for no data
1 parent 1b6dd7d commit 10c3540

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/syscalls/net.asm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ b_net_rx:
138138
; Call the driver poll function
139139
call [rdx+nt_poll] ; Call driver poll function passing RDX as interface
140140

141+
cmp cx, 0 ; No data?
142+
je b_net_rx_end ; If so, don't increment counters
143+
141144
; Increment interface counters
142145
inc qword [rdx+nt_rx_packets]
143146
add qword [rdx+nt_rx_bytes], rcx

0 commit comments

Comments
 (0)