<br><br><div class="gmail_quote">On Tue, Apr 12, 2011 at 2:57 PM, Mark Smith <span dir="ltr">&lt;<a href="mailto:radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org">radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org</a>&gt;</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 &lt;<a href="mailto:radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org">radvd@02a76c927861ca7413a122f2a73a0d37.nosense.org</a>&gt; wrote:<br>
<br>
</div><div class="im">&gt; Hi Reuben,<br>
&gt;<br>
&gt; On Mon, 4 Apr 2011 07:30:16 -0700<br>
&gt; Reuben Hawkins &lt;<a href="mailto:reubenhwk@gmail.com">reubenhwk@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi Mark,<br>
&gt; &gt;<br>
&gt; &gt; It looks like everything is working.  I applied the patch.  If you would<br>
&gt; &gt; like to submit another patch with a some logging, I&#39;ll apply it too.<br>
&gt;<br>
&gt; Happy to do that.<br>
&gt;<br>
</div>&lt;snip&gt;<br>
<br>
Here&#39;s what I&#39;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, &quot;Resetting prefix lifetimes\n&quot;);<br>
</div>@@ -696,6 +697,9 @@ void reset_prefix_lifetimes(void)<br>
                {<br>
                        if (prefix-&gt;DecrementLifetimesFlag)<br>
                        {<br>
+                               print_addr(&amp;prefix-&gt;Prefix, pfx_str);<br>
+                               dlog(LOG_DEBUG, 4, &quot;%s/%u%%%s plft reset from %u to %u secs&quot;, pfx_str, prefix-&gt;PrefixLen, iface-&gt;Name, prefix-&gt;curr_preferredlft, prefix-&gt;AdvPreferredLifetime);<br>
+                               dlog(LOG_DEBUG, 4, &quot;%s/%u%%%s vlft reset from %u to %u secs&quot;, pfx_str, prefix-&gt;PrefixLen, iface-&gt;Name, prefix-&gt;curr_validlft, prefix-&gt;AdvValidLifetime);<br>
<div class="im">                                prefix-&gt;curr_validlft =<br>
                                                prefix-&gt;AdvValidLifetime;<br>
                                prefix-&gt;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, &quot;Will cease advertising %s/%u%%%s, preferred lifetime 0&quot;, 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>
                                                                &amp;prefix-&gt;curr_preferredlft);<br>
</div>+                                       if (prefix-&gt;curr_preferredlft == 0)<br>
+                                               cease_adv_pfx_msg(iface-&gt;Name, &amp;prefix-&gt;Prefix, prefix-&gt;PrefixLen);<br>
<div><div></div><div class="h5">                                }<br>
                                pinfo-&gt;nd_opt_pi_valid_time     = htonl(prefix-&gt;curr_validlft);<br>
                                pinfo-&gt;nd_opt_pi_preferred_time = htonl(prefix-&gt;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>