kernel/network: fix ARP remove on devices other than 0
Check kernel codestyle / Check kernel codestyle (pull_request) Successful in 21s
Test PR / Build (ru_RU) (pull_request) Successful in 1m55s
Test PR / Build (es_ES) (pull_request) Successful in 2m0s
Test PR / Build (en_US) (pull_request) Successful in 2m4s

arp_api .remove forgot the per-device table offset, so it deleted
from device 0's table and shifted device 1's entries into it.
This commit is contained in:
Leency committed 2026-09-30 08:42:55 +03:00
1 parent bd071d588b
commit 5139f994c4
1 file changed
+4 -2
+4 -2
View File
@@ -688,10 +688,12 @@ arp_api:
; ecx = # entry
cmp ecx, [ARP_entries + eax]
jae .error
imul ecx, sizeof.ARP_entry
lea esi, [ARP_table + ecx]
mov edi, eax
shr edi, 2
mov esi, edi
imul esi, sizeof.ARP_entry*ARP_TABLE_SIZE
imul ecx, sizeof.ARP_entry
lea esi, [ARP_table + esi + ecx]
call arp_del_entry
ret