1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

BIND: Enable hermetic zone builds (#2275)

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
Tom Limoncelli
2023-04-25 18:00:11 -05:00
committed by GitHub
parent b24e7ef126
commit fba40d5373
3 changed files with 25 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ import (
"log"
"strconv"
"time"
"github.com/StackExchange/dnscontrol/v3/pkg/bindserial"
)
var nowFunc = time.Now
@@ -18,6 +20,12 @@ func generateSerial(oldSerial uint32) uint32 {
// that is smaller than the old one, we punt and increment the old number.
// At no time will a serial number == 0 be returned.
if bindserial.ForcedValue != 0 {
// https://github.com/StackExchange/dnscontrol/issues/1859
// User needs to have reproducible builds and BIND generates
return uint32(bindserial.ForcedValue & 0xFFFF)
}
original := oldSerial
var newSerial uint32