mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
unbound: improve interface trigger behavior
procd interface triggers may be busy. Unbound hard restarts will flush the cache. This might happen frequently depending on how interface triggers occur. Change the procd trigger to reduce occurences. Load this trigger prior to netifd (START=20), but only truly start Unbound from the trigger rather than immediately in init. Clean up log entries in scripts after Unbound, NTP, and DNSSEC are established. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
This commit is contained in:
@@ -28,10 +28,13 @@
|
||||
|
||||
/^#/ {
|
||||
# We need to pick out DHCP v4 or v6 records
|
||||
net = $2 ; id = $3 ; cls = $4 ; hst = $5 ; adr = $9 ;
|
||||
net = $2 ; id = $3 ; cls = $4 ; hst = $5 ; adr = $9 ; adr2 = $10
|
||||
cdr = adr ;
|
||||
cdr2 = adr2 ;
|
||||
sub( /\/.*/, "", adr ) ;
|
||||
sub( /.*\//, "", cdr ) ;
|
||||
sub( /\/.*/, "", adr2 ) ;
|
||||
sub( /.*\//, "", cdr2 ) ;
|
||||
|
||||
|
||||
if ( bisolt == 1 ) {
|
||||
@@ -132,6 +135,22 @@
|
||||
print ( x "\n" y ) > hostfile ;
|
||||
}
|
||||
}
|
||||
|
||||
if (( cdr2 == 128 ) && ( hst != "-" )) {
|
||||
if ( bconf == 1 ) {
|
||||
x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr2 "\"" ) ;
|
||||
y = ( "local-data-ptr: \"" adr2 " 120 " fqdn "\"" ) ;
|
||||
print ( x "\n" y ) > hostfile ;
|
||||
}
|
||||
|
||||
else {
|
||||
# odhcp puts GA and ULA on the same line (position 9 and 10)
|
||||
qpr2 = ipv6_ptr( adr2 ) ;
|
||||
x = ( fqdn ". 120 IN AAAA " adr2 ) ;
|
||||
y = ( qpr2 ". 120 IN PTR " fqdn ) ;
|
||||
print ( x "\n" y ) > hostfile ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user