[radvd-devel-l] [PATCH] radvd: Fix prefix option missing when AdvPreferredLifetime equals 0.

Li Wei lw at cn.fujitsu.com
Tue Feb 14 22:44:27 EST 2012


Without "DecrementLifetimes" on, we should include the prefix option
in the RA packets even when AdvPreferredLifetime equals 0, and set
AdvPreferredLifetime as user specified(zero).

Signed-off-by: Li Wei <lw at cn.fujitsu.com>
---
 send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/send.c b/send.c
index 9e6a29c..3c56bfb 100644
--- a/send.c
+++ b/send.c
@@ -221,7 +221,7 @@ send_ra(struct Interface *iface, struct in6_addr *dest)
 
 	while(prefix)
 	{
-		if( prefix->enabled && prefix->curr_preferredlft > 0 )
+		if( prefix->enabled && (!prefix->DecrementLifetimesFlag || prefix->curr_preferredlft > 0) )
 		{
 			struct nd_opt_prefix_info *pinfo;
 
-- 
1.7.1





More information about the radvd-devel-l mailing list