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

オープン
#5,931 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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]

主要言語
PHP
スター
1.2k
フォーク
926
平均マージ
1日 10時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opnsense/plugins のほかの issue

opnsense/plugins の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。