create_dhcp_reservation looks up an existing reservation by ip_address only (napalm_opnsense/opnsense.py, the searchReservation loop). If a reservation for that IP belongs to another MAC — e.g. made by hand — the driver overwrites it with the new MAC and replaces its description with [netork], without a warning.
delete_dhcp_reservation_and_lease(mac, ip) also matches on IP only and ignores mac. After an address was reused or edited by hand it deletes the reservation of a different host.
Fix: match on IP and MAC (normalised with napalm_device_types.dhcp.normalize_mac). On create, an IP held by another MAC should raise (the caller decides) instead of taking it over; on delete, a reservation for the IP with another MAC is left alone and reported.
**Priority: P3** (important, not urgent).
- `create_dhcp_reservation` looks up an existing reservation by `ip_address` only (`napalm_opnsense/opnsense.py`, the `searchReservation` loop). If a reservation for that IP belongs to another MAC — e.g. made by hand — the driver overwrites it with the new MAC and replaces its description with `[netork]`, without a warning.
- `delete_dhcp_reservation_and_lease(mac, ip)` also matches on IP only and ignores `mac`. After an address was reused or edited by hand it deletes the reservation of a different host.
**Fix:** match on IP *and* MAC (normalised with `napalm_device_types.dhcp.normalize_mac`). On create, an IP held by another MAC should raise (the caller decides) instead of taking it over; on delete, a reservation for the IP with another MAC is left alone and reported.
Found during netOrk issue NetOrk/netork#1187 (2026-10-21).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Priority: P3 (important, not urgent).
create_dhcp_reservationlooks up an existing reservation byip_addressonly (napalm_opnsense/opnsense.py, thesearchReservationloop). If a reservation for that IP belongs to another MAC — e.g. made by hand — the driver overwrites it with the new MAC and replaces its description with[netork], without a warning.delete_dhcp_reservation_and_lease(mac, ip)also matches on IP only and ignoresmac. After an address was reused or edited by hand it deletes the reservation of a different host.Fix: match on IP and MAC (normalised with
napalm_device_types.dhcp.normalize_mac). On create, an IP held by another MAC should raise (the caller decides) instead of taking it over; on delete, a reservation for the IP with another MAC is left alone and reported.Found during netOrk issue NetOrk/netork#1187 (2026-10-21).