mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-09-21 05:15:00 -04:00
When a parent device has NIC children, update_devPresentLastScan_based_on_nics previously replaced the parent's devPresentLastScan unconditionally with the NIC-derived value. This discarded any genuine direct detection of the parent: if the parent was found by ARP/save_own_device (present=1) but its NIC child was absent (present=0), the NIC step forced the parent back to 0. The next scan re-detected the parent → Connected event → NIC forced it down again, producing an endless one-directional Connected event stream. Fix: use max(original, nic_derived) so NIC children can only raise a parent's presence (bring an undetected parent online), never lower it when the parent itself was directly detected this cycle. Adds test/scan/test_nic_presence.py covering the exact regression scenario and surrounding cases (raise, no-NIC unchanged, req_all modes). Fixes #1736 Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>