<br><br><div class="gmail_quote">On Tue, Apr 12, 2011 at 2:57 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 Reuben,<br>
<br>
On Wed, 6 Apr 2011 21:46:29 +0930<br>
<div class="im">Mark Smith <<a href="mailto:radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org">radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org</a>> wrote:<br>
<br>
</div><div class="im">> Hi Reuben,<br>
><br>
> On Mon, 4 Apr 2011 07:30:16 -0700<br>
> Reuben Hawkins <<a href="mailto:reubenhwk@gmail.com">reubenhwk@gmail.com</a>> wrote:<br>
><br>
> ><br>
> ><br>
> > Hi Mark,<br>
> ><br>
> > It looks like everything is working. I applied the patch. If you would<br>
> > like to submit another patch with a some logging, I'll apply it too.<br>
><br>
> Happy to do that.<br>
><br>
</div><snip><br>
<br>
Here's what I've come up with.<br>
<br>
The debug message for when a prefix will cease being advertised is -<br>
<br>
[Apr 13 07:20:17] radvd: Will cease advertising 2001:db8::/64%dummy0,<br>
preferred lifetime is 0<br>
<br>
While the debug messages for when the prefix lifetimes is reset is -<br>
<br>
[Apr 13 07:23:58] radvd: Resetting prefix lifetimes<br>
[Apr 13 07:23:58] radvd: 2001:db8::/64%dummy0 plft reset from 0 to 10<br>
secs<br>
[Apr 13 07:23:58] radvd: 2001:db8::/64%dummy0 vlft reset from 14385 to<br>
14400 secs<br>
<br>
Patch shown below and attached. This should apply to cvs update 1.117<br>
<br>
Regards,<br>
Mark.<br>
<div class="im"><br>
<br>
diff --git a/radvd.c b/radvd.c<br>
</div>index 3485c5a..3d8ece7 100644<br>
<div class="im">--- a/radvd.c<br>
+++ b/radvd.c<br>
</div>@@ -685,6 +685,7 @@ void reset_prefix_lifetimes(void)<br>
<div class="im"> {<br>
struct Interface *iface;<br>
struct AdvPrefix *prefix;<br>
</div>+ char pfx_str[INET6_ADDRSTRLEN];<br>
<div class="im"><br>
<br>
flog(LOG_INFO, "Resetting prefix lifetimes\n");<br>
</div>@@ -696,6 +697,9 @@ void reset_prefix_lifetimes(void)<br>
{<br>
if (prefix->DecrementLifetimesFlag)<br>
{<br>
+ print_addr(&prefix->Prefix, pfx_str);<br>
+ dlog(LOG_DEBUG, 4, "%s/%u%%%s plft reset from %u to %u secs", pfx_str, prefix->PrefixLen, iface->Name, prefix->curr_preferredlft, prefix->AdvPreferredLifetime);<br>
+ dlog(LOG_DEBUG, 4, "%s/%u%%%s vlft reset from %u to %u secs", pfx_str, prefix->PrefixLen, iface->Name, prefix->curr_validlft, prefix->AdvValidLifetime);<br>
<div class="im"> prefix->curr_validlft =<br>
prefix->AdvValidLifetime;<br>
prefix->curr_preferredlft =<br>
</div><div class="im">diff --git a/send.c b/send.c<br>
</div>index 6d12ff6..d1ecc83 100644<br>
<div class="im">--- a/send.c<br>
+++ b/send.c<br>
</div>@@ -100,6 +100,16 @@ static void decrement_lifetime(const time_t secs, uint32_t *lifetime)<br>
}<br>
}<br>
<br>
+static void cease_adv_pfx_msg(const char *if_name, struct in6_addr *pfx, const int pfx_len)<br>
+{<br>
+ char pfx_str[INET6_ADDRSTRLEN];<br>
+<br>
+ print_addr(pfx, pfx_str);<br>
+<br>
+ dlog(LOG_DEBUG, 3, "Will cease advertising %s/%u%%%s, preferred lifetime 0", pfx_str, pfx_len, if_name);<br>
+<br>
<div class="im">+}<br>
+<br>
int<br>
send_ra(struct Interface *iface, struct in6_addr *dest)<br>
{<br>
</div>@@ -239,6 +249,8 @@ send_ra(struct Interface *iface, struct in6_addr *dest)<br>
<div class="im"><br>
decrement_lifetime(secs_since_last_ra,<br>
&prefix->curr_preferredlft);<br>
</div>+ if (prefix->curr_preferredlft == 0)<br>
+ cease_adv_pfx_msg(iface->Name, &prefix->Prefix, prefix->PrefixLen);<br>
<div><div></div><div class="h5"> }<br>
pinfo->nd_opt_pi_valid_time = htonl(prefix->curr_validlft);<br>
pinfo->nd_opt_pi_preferred_time = htonl(prefix->curr_preferredlft);<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></div><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><br><br>Logging patch applied...<br>