[radvd-devel-l] FlushDNSSL option
Mark Smith
radvd at 02a76c927861ca7413a122f2a73a0d37.nosense.org
Fri Mar 25 05:28:39 EDT 2011
Hi,
The final "deprecate/remove/flush" configuration option - this one for
DNSSL. From the manual page -
FlushDNSSL on|off
Upon shutdown, announce the DNSSL entries with a zero
second lifetime. This should cause the DNSSL entries to
be immediately removed from the end-nodes' DNS search
list.
Default: on
After this, there should now be -
DeprecatePrefix (default: off)
RemoveRoute (default: on)
FlushRDNSS (default: on)
FlushDNSSL (default: on)
As before, shown below and attached. Should apply to cvs update 1.116.
Thanks,
Mark.
diff --git a/defaults.h b/defaults.h
index 059cbd5..f1aa968 100644
--- a/defaults.h
+++ b/defaults.h
@@ -70,6 +70,7 @@
/* DNSSL */
#define DFLT_AdvDNSSLLifetime(iface) (iface)->MaxRtrAdvInterval
+#define DFLT_FlushDNSSLFlag 1
/* Protocol (RFC4861) constants: */
diff --git a/gram.y b/gram.y
index 3c648fe..faffa1b 100644
--- a/gram.y
+++ b/gram.y
@@ -119,6 +119,7 @@ static struct in6_addr get_prefix6(struct in6_addr const *addr, struct in6_addr
%token T_FlushRDNSS
%token T_AdvDNSSLLifetime
+%token T_FlushDNSSL
%token T_AdvMobRtrSupportFlag
@@ -883,6 +884,10 @@ dnsslparms : T_AdvDNSSLLifetime number_or_infinity ';'
dnssl->AdvDNSSLLifetime = $2;
}
+ | T_FlushDNSSL SWITCH ';'
+ {
+ dnssl->FlushDNSSLFlag = $2;
+ }
;
number_or_infinity : NUMBER
diff --git a/interface.c b/interface.c
index 54265ec..291136c 100644
--- a/interface.c
+++ b/interface.c
@@ -88,6 +88,7 @@ dnssl_init_defaults(struct AdvDNSSL *dnssl, struct Interface *iface)
memset(dnssl, 0, sizeof(struct AdvDNSSL));
dnssl->AdvDNSSLLifetime = DFLT_AdvDNSSLLifetime(iface);
+ dnssl->FlushDNSSLFlag = DFLT_FlushDNSSLFlag;
}
int
diff --git a/radvd.conf.5.man b/radvd.conf.5.man
index a8f1e7b..5fabed6 100644
--- a/radvd.conf.5.man
+++ b/radvd.conf.5.man
@@ -538,6 +538,15 @@ DNSSL info gets removed in a timely fashion, this should not be greater than
Default: 2*MaxRtrAdvInterval
+.TP
+.BR FlushDNSSL " " on | off
+
+Upon shutdown, announce the DNSSL entries with a zero second lifetime. This should cause the DNSSL entries to be immediately removed from the end-nodes' DNS search list.
+
+Default: on
+
+.SH DNSSL SPECIFIC OPTIONS
+
.SH EXAMPLES
.nf
diff --git a/radvd.h b/radvd.h
index 8ea9460..0cdf37b 100644
--- a/radvd.h
+++ b/radvd.h
@@ -148,6 +148,7 @@ struct AdvDNSSL {
uint32_t AdvDNSSLLifetime;
int AdvDNSSLNumber;
+ int FlushDNSSLFlag;
char **AdvDNSSLSuffixes;
struct AdvDNSSL *next;
diff --git a/scanner.l b/scanner.l
index 21f5b5b..c1934fc 100644
--- a/scanner.l
+++ b/scanner.l
@@ -93,6 +93,7 @@ AdvRDNSSLifetime { return T_AdvRDNSSLifetime; }
FlushRDNSS { return T_FlushRDNSS; }
AdvDNSSLLifetime { return T_AdvDNSSLLifetime; }
+FlushDNSSL { return T_FlushDNSSL; }
MinDelayBetweenRAs { return T_MinDelayBetweenRAs; }
diff --git a/send.c b/send.c
index 6d45403..7690ebb 100644
--- a/send.c
+++ b/send.c
@@ -298,7 +298,11 @@ send_ra(struct Interface *iface, struct in6_addr *dest)
dnsslinfo->nd_opt_dnssli_len = 1; /* more further down */
dnsslinfo->nd_opt_dnssli_reserved = 0;
- dnsslinfo->nd_opt_dnssli_lifetime = htonl(dnssl->AdvDNSSLLifetime);
+ if (iface->cease_adv && dnssl->FlushDNSSLFlag) {
+ dnsslinfo->nd_opt_dnssli_lifetime = 0;
+ } else {
+ dnsslinfo->nd_opt_dnssli_lifetime = htonl(dnssl->AdvDNSSLLifetime);
+ }
buff_ptr = dnsslinfo->nd_opt_dnssli_suffixes;
for (i = 0; i < dnssl->AdvDNSSLNumber; i++) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FlushDNSSL.patch
Type: text/x-patch
Size: 2919 bytes
Desc: not available
URL: <http://lists.litech.org/pipermail/radvd-devel-l/attachments/20110325/6a866a46/attachment.bin>
More information about the radvd-devel-l
mailing list