ndisc: don't artificially extend the lifetime of DNSSL/RDNSS options

RFCs actually expect to honor the lifetime. See for example [1].

This is just not right, and totally arbitrary. It was added
when our libndp based implementation was added, but unclear
why this was done (beyond the code comment).

[1] page 204, v6LC.2.2.25: Processing Router Advertisement DNS (Host
    only) at https://ipv6ready.org/docs/Core_Conformance_5_0_0.pdf

(cherry picked from commit 68528f7af5)
This commit is contained in:
Thomas Haller 2021-01-13 17:49:49 +01:00
parent 08492516e7
commit 34b08f8a96
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -249,13 +249,6 @@ receive_ra(struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
.lifetime = ndp_msg_opt_rdnss_lifetime(msg, offset),
};
/* Pad the lifetime somewhat to give a bit of slack in cases
* where one RA gets lost or something (which can happen on unreliable
* links like Wi-Fi where certain types of frames are not retransmitted).
* Note that 0 has special meaning and is therefore not adjusted.
*/
if (dns_server.lifetime && dns_server.lifetime < 7200)
dns_server.lifetime = 7200;
if (nm_ndisc_add_dns_server(ndisc, &dns_server))
changed |= NM_NDISC_CONFIG_DNS_SERVERS;
}
@ -271,13 +264,6 @@ receive_ra(struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
.lifetime = ndp_msg_opt_dnssl_lifetime(msg, offset),
};
/* Pad the lifetime somewhat to give a bit of slack in cases
* where one RA gets lost or something (which can happen on unreliable
* links like Wi-Fi where certain types of frames are not retransmitted).
* Note that 0 has special meaning and is therefore not adjusted.
*/
if (dns_domain.lifetime && dns_domain.lifetime < 7200)
dns_domain.lifetime = 7200;
if (nm_ndisc_add_dns_domain(ndisc, &dns_domain))
changed |= NM_NDISC_CONFIG_DNS_DOMAINS;
}