os-bind: Apply silently loses newly added static records on dynamic zones (allowrndcupdate)

Abierto
#5,931 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php

Línea de trabajo

Start by tracing the BIND reconfigure action that reloads the OPNsense/Bind template and restarts named, then inspect the zone model and generated master-file path described in the report. Check how dynamic zones with allowrndcupdate are handled during Apply and compare that with ISC's documented dynamic-zone edit cycle. Done when a static record remains in the master file and answers after Apply on a zone with dynamic updates.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

incomplete

Bug summary

Adding a static record to a dynamic zone (one with Allow RNDC update / allowrndcupdate enabled, e.g. receiving Kea DDNS updates via RFC 2136) through the GUI and pressing Apply results in the new record being silently lost. The GUI reports success, but the record never answers.

Root cause (verified on os-bind 1.34_4, OPNsense 26.7)

The reconfigure action performs, in order:

  1. template reload OPNsense/Bind → regenerates the zone master file from the model (contains only static records),
  2. configctl bind restart → rc.d/named restart.

On stop, named flushes its in-memory zone state (old statics + dynamic journal content, without the new record) over the freshly generated master file. On start, named loads that dumped file. The newly added static record is gone.

If the zone is not dirty (no dynamic updates since load, e.g. zones without DDNS) named does not dump, the generated file survives, and Apply works — which is why this only hits dynamic zones.

Steps to reproduce

  1. Create a primary zone, enable Allow RNDC update (allowrndcupdate), have a DHCP server (Kea) register dynamic records via RFC 2136 so the zone has a journal and is "dirty".
  2. GUI → Services → BIND → Records → add a new static A record → Apply.
  3. Query the new name (e.g. dig @<firewall> newrecord.<zone>) → NXDOMAIN / no answer.
  4. The record is also absent from the master file on disk (/usr/local/etc/namedb/primary/<zone>.db) after Apply.

Expected: record persists and answers after Apply.

Suggested fix

For zones with allowrndcupdate enabled, the reconfigure should follow ISC's documented edit cycle for dynamic zones before regenerating templates: rndc freeze <zone> → regenerate → rndc reload/rndc thaw (or at minimum rndc sync -clean before the template reload), so the dumped state cannot overwrite the freshly generated master file.

Workarounds in the meantime

  • Apply twice (second Apply loads the record because the zone is no longer dirty in that window — racy if new DDNS updates arrive in between), or
  • keep DHCP-registered names in a separate zone.

Environment

  • OPNsense 26.7 (FreeBSD 15.1-RELEASE-p6)
  • os-bind 1.34_4
  • BIND 9.20.30
  • Kea DHCP (core) doing RFC 2136 DDNS into the affected zone

Reported by: Daniel Ortiz [email protected]

Lenguaje dominante
PHP
Estrellas
1.2k
Forks
926
Merge medio
1 d 10 h
PR fusionados (30 d)
25

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de opnsense/plugins

Todos los issues de opnsense/plugins

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.