Index | Thread | Search

From:
Josh Rickmar <jrick@zettaport.com>
Subject:
Re: rad(8): Adjust rDNS lifetime to RFC 8106 default (minimum) value.
To:
tech <tech@openbsd.org>
Date:
Sat, 28 Dec 2024 03:52:20 -0500

Download raw body.

Thread
On Sat, Dec 28, 2024 at 09:29:54AM +0100, Florian Obser wrote:
> This makes the rDNS lifetime the same as the router lifetime (1800
> seconds). rad(8) already lists 8106 under standards, but we used the old
> value from 6106.
> It also does not make any sense to expire the rDNS information before
> the router itself. This is information that travels together.
> 
> OK?
> 
> diff --git rad.conf.5 rad.conf.5
> index b90934603f7..8abd51b9bed 100644
> --- rad.conf.5
> +++ rad.conf.5
> @@ -76,7 +76,7 @@ options are as follows:
>  .It Ic lifetime Ar seconds
>  The number of seconds the dns options are valid after receiving a router
>  advertisement message.
> -The default is 900 seconds.
> +The default is 1800 seconds.
>  .It Ic nameserver Pq Ar address Ns | Ns Brq Ar address ...
>  IPv6 address or list of IPv6 addresses of DNS name servers.
>  .It Ic search Pq Ar domain Ns | Ns Brq Ar domain ...
> diff --git rad.h rad.h
> index 46cdc51ea64..e0e59a31a38 100644
> --- rad.h
> +++ rad.h
> @@ -34,7 +34,7 @@
>  #define	MAX_RA_DELAY_TIME	500	/* 500 milliseconds */
>  #define	MIN_DELAY_BETWEEN_RAS	3	/* 3 seconds */
>  #define	MAX_SEARCH		1025	/* MAXDNAME in arpa/nameser.h */
> -#define	DEFAULT_RDNS_LIFETIME	600 * 1.5
> +#define	DEFAULT_RDNS_LIFETIME	3 * MAX_RTR_ADV_INTERVAL
>  #define	PLTIME_DECAYING		1
>  #define	VLTIME_DECAYING		2
>  
> 
> -- 
> In my defence, I have been left unsupervised.
> 

This is the same diff I was testing to try and fix my iphone from
forgetting the advertised DNS servers and kicking back to LTE when
connected to an IPv6-only wifi network.  I also tried setting this
lifetime up to 6x the maximum router interval, but the iphone would
still lose wifi if I kept it sleeping long enough.

This appears to be Apple's bug, and I've found other cases of people
discovering this limitation after doing some additional internet
searches.

For my usage, I have increased the DNS lifetime to a week, but
changing this default value still looks right to me.

ok jrick