summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-05-19 16:56:11 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-19 16:56:11 -0700
commit6f704992d3658aadff9e506c7fd80957fce33c5f (patch)
treeb8e845b90aed66de04f7ca8eb21363e8e7876c18 /net/ipv6/route.c
parent69cdf8f92a8dd191eee0e834c631d84a140b1121 (diff)
ipv6 addrconf: Allow infinite prefix lifetime.
We need to handle infinite prefix lifetime specially. With help from original reporter "Bonitch, Joseph" <Joseph.Bonitch@xerox.com>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index b45a7c0268c..b7a4a875a26 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1106,7 +1106,9 @@ int ip6_route_add(struct fib6_config *cfg)
}
rt->u.dst.obsolete = -1;
- rt->rt6i_expires = jiffies + clock_t_to_jiffies(cfg->fc_expires);
+ rt->rt6i_expires = (cfg->fc_flags & RTF_EXPIRES) ?
+ jiffies + clock_t_to_jiffies(cfg->fc_expires) :
+ 0;
if (cfg->fc_protocol == RTPROT_UNSPEC)
cfg->fc_protocol = RTPROT_BOOT;