<br><br><div class="gmail_quote">On Thu, Mar 24, 2011 at 10:28 PM, Mark Smith <span dir="ltr"><<a href="mailto:radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org">radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<br>
Following from the discussion with Pekka a few days ago, I've renamed<br>
the RemoveRDNSS option to "FlushRDNSS". There are no other changes.<br>
<br>
Patch attached and shown below, should apply to cvs revision 1.115.<br>
<br>
Thanks,<br>
Mark.<br>
<br>
diff --git a/defaults.h b/defaults.h<br>
index 0bf357b..ddb6e43 100644<br>
--- a/defaults.h<br>
+++ b/defaults.h<br>
@@ -65,6 +65,7 @@<br>
<br>
/* RDNSS */<br>
#define DFLT_AdvRDNSSLifetime(iface) (iface)->MaxRtrAdvInterval<br>
+#define DFLT_FlushRDNSSFlag 1<br>
<br>
/* DNSSL */<br>
#define DFLT_AdvDNSSLLifetime(iface) (iface)->MaxRtrAdvInterval<br>
diff --git a/gram.y b/gram.y<br>
index 2d13800..232e895 100644<br>
--- a/gram.y<br>
+++ b/gram.y<br>
@@ -115,6 +115,7 @@ static struct in6_addr get_prefix6(struct in6_addr const *addr, struct in6_addr<br>
%token T_AdvRDNSSPreference<br>
%token T_AdvRDNSSOpenFlag<br>
%token T_AdvRDNSSLifetime<br>
+%token T_FlushRDNSS<br>
<br>
%token T_AdvDNSSLLifetime<br>
<br>
@@ -789,6 +790,10 @@ rdnssparms : T_AdvRDNSSPreference NUMBER ';'<br>
<br>
rdnss->AdvRDNSSLifetime = $2;<br>
}<br>
+ | T_FlushRDNSS SWITCH ';'<br>
+ {<br>
+ rdnss->FlushRDNSSFlag = $2;<br>
+ }<br>
;<br>
<br>
dnssldef : dnsslhead '{' optional_dnsslplist '}' ';'<br>
diff --git a/interface.c b/interface.c<br>
index 072f548..b857008 100644<br>
--- a/interface.c<br>
+++ b/interface.c<br>
@@ -78,6 +78,7 @@ rdnss_init_defaults(struct AdvRDNSS *rdnss, struct Interface *iface)<br>
<br>
rdnss->AdvRDNSSLifetime = DFLT_AdvRDNSSLifetime(iface);<br>
rdnss->AdvRDNSSNumber = 0;<br>
+ rdnss->FlushRDNSSFlag = DFLT_FlushRDNSSFlag;<br>
}<br>
<br>
void<br>
diff --git a/radvd.conf.5.man b/radvd.conf.5.man<br>
index dcc4314..f58ff4d 100644<br>
--- a/radvd.conf.5.man<br>
+++ b/radvd.conf.5.man<br>
@@ -498,24 +498,27 @@ Default: medium<br>
.SH RDNSS SPECIFIC OPTIONS<br>
<br>
.TP<br>
-.BR "AdvRDNSSPreference " integer;<br>
+.BR "AdvRDNSSPreference " integer<br>
.TP<br>
-.BR "AdvRDNSSOpen " on | off;<br>
+.BR "AdvRDNSSOpen " on | off<br>
<br>
These features were present in the draft specification but were removed<br>
from RFC5006. They are still accepted in the configuration but<br>
ignored.<br>
<br>
.TP<br>
-.BR "AdvRDNSSLifetime " seconds | infinity;<br>
-The maximum duration how long the RDNSS entries are used for name resolution. A value of 0 means the nameserver should no longer be used.<br>
-The maximum duration how long the RDNSS entries are used for name resolution. A value of 0 means the nameserver should no longer be used.<br>
-The value, if not 0, must be at least MaxRtrAdvInterval. To ensure stale<br>
-RDNSS info gets removed in a timely fashion, this should not be greater than<br>
-2*MaxRtrAdvInterval.<br>
+.BR "AdvRDNSSLifetime " seconds | infinity<br>
+The maximum duration how long the RDNSS entries are used for name resolution. A value of 0 means the nameserver must no longer be used. The value, if not 0, must be at least MaxRtrAdvInterval. To ensure stale RDNSS info gets removed in a timely fashion, this should not be greater than 2*MaxRtrAdvInterval.<br>
<br>
Default: 2*MaxRtrAdvInterval<br>
<br>
+.TP<br>
+.BR FlushRDNSS " " on | off<br>
+<br>
+Upon shutdown, announce the RDNSS entries with a zero second lifetime. This should cause the RDNSS addresses to be immediately removed from the end-nodes' list of Recursive DNS Servers.<br>
+<br>
+Default: on<br>
+<br>
.SH DNSSL SPECIFIC OPTIONS<br>
<br>
.TP<br>
diff --git a/radvd.h b/radvd.h<br>
index 3b8b0e5..b7d30a1 100644<br>
--- a/radvd.h<br>
+++ b/radvd.h<br>
@@ -135,6 +135,7 @@ struct AdvRoute {<br>
struct AdvRDNSS {<br>
int AdvRDNSSNumber;<br>
uint32_t AdvRDNSSLifetime;<br>
+ int FlushRDNSSFlag;<br>
struct in6_addr AdvRDNSSAddr1;<br>
struct in6_addr AdvRDNSSAddr2;<br>
struct in6_addr AdvRDNSSAddr3;<br>
diff --git a/scanner.l b/scanner.l<br>
index b6ca361..86579f2 100644<br>
--- a/scanner.l<br>
+++ b/scanner.l<br>
@@ -89,6 +89,7 @@ AdvRouteLifetime { return T_AdvRouteLifetime; }<br>
AdvRDNSSPreference { return T_AdvRDNSSPreference; }<br>
AdvRDNSSOpen { return T_AdvRDNSSOpenFlag; }<br>
AdvRDNSSLifetime { return T_AdvRDNSSLifetime; }<br>
+FlushRDNSS { return T_FlushRDNSS; }<br>
<br>
AdvDNSSLLifetime { return T_AdvDNSSLLifetime; }<br>
<br>
diff --git a/send.c b/send.c<br>
index cd8ef9f..a717226 100644<br>
--- a/send.c<br>
+++ b/send.c<br>
@@ -259,7 +259,11 @@ send_ra(struct Interface *iface, struct in6_addr *dest)<br>
rdnssinfo->nd_opt_rdnssi_len = 1 + 2*rdnss->AdvRDNSSNumber;<br>
rdnssinfo->nd_opt_rdnssi_pref_flag_reserved = 0;<br>
<br>
- rdnssinfo->nd_opt_rdnssi_lifetime = htonl(rdnss->AdvRDNSSLifetime);<br>
+ if (iface->cease_adv && rdnss->FlushRDNSSFlag) {<br>
+ rdnssinfo->nd_opt_rdnssi_lifetime = 0;<br>
+ } else {<br>
+ rdnssinfo->nd_opt_rdnssi_lifetime = htonl(rdnss->AdvRDNSSLifetime);<br>
+ }<br>
<br>
memcpy(&rdnssinfo->nd_opt_rdnssi_addr1, &rdnss->AdvRDNSSAddr1,<br>
sizeof(struct in6_addr));<br>
<br>--<br>
radvd-devel-l mailing list : <a href="mailto:radvd-devel-l@litech.org">radvd-devel-l@litech.org</a><br>
<a href="http://lists.litech.org/listinfo/radvd-devel-l" target="_blank">http://lists.litech.org/listinfo/radvd-devel-l</a><br></blockquote></div><br>Hi Mark,<br><br>Committed in CVS. I'll update my git repo tomorrow to reflect the changes (if you want to review the diff).<br>
<br>Thanks,<br>Reuben<br>