|
Neil Horman |
4925439 |
commit 24f5b855e17df7e355eacd6c4a12cc4d6a6c9ff0
|
|
Neil Horman |
4925439 |
Author: Li RongQing <roy.qing.li@gmail.com>
|
|
Neil Horman |
4925439 |
Date: Thu Dec 19 12:40:26 2013 +0800
|
|
Neil Horman |
4925439 |
|
|
Neil Horman |
4925439 |
ipv6: always set the new created dst's from in ip6_rt_copy
|
|
Neil Horman |
4925439 |
|
|
Neil Horman |
4925439 |
ip6_rt_copy only sets dst.from if ort has flag RTF_ADDRCONF and RTF_DEFAULT.
|
|
Neil Horman |
4925439 |
but the prefix routes which did get installed by hand locally can have an
|
|
Neil Horman |
4925439 |
expiration, and no any flag combination which can ensure a potential from
|
|
Neil Horman |
4925439 |
does never expire, so we should always set the new created dst's from.
|
|
Neil Horman |
4925439 |
|
|
Neil Horman |
4925439 |
This also fixes the new created dst is always expired since the ort, which
|
|
Neil Horman |
4925439 |
is created by RA, maybe has RTF_EXPIRES and RTF_ADDRCONF, but no RTF_DEFAULT.
|
|
Neil Horman |
4925439 |
|
|
Neil Horman |
4925439 |
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
|
|
Neil Horman |
4925439 |
CC: Gao feng <gaofeng@cn.fujitsu.com>
|
|
Neil Horman |
4925439 |
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
|
|
Neil Horman |
4925439 |
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
|
|
Neil Horman |
4925439 |
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Neil Horman |
4925439 |
|
|
Neil Horman |
4925439 |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
|
|
Neil Horman |
4925439 |
index a0a48ac..4b4944c 100644
|
|
Neil Horman |
4925439 |
--- a/net/ipv6/route.c
|
|
Neil Horman |
4925439 |
+++ b/net/ipv6/route.c
|
|
Neil Horman |
4925439 |
@@ -1905,9 +1905,7 @@ static struct rt6_info *ip6_rt_copy(struct rt6_info *ort,
|
|
Neil Horman |
4925439 |
else
|
|
Neil Horman |
4925439 |
rt->rt6i_gateway = *dest;
|
|
Neil Horman |
4925439 |
rt->rt6i_flags = ort->rt6i_flags;
|
|
Neil Horman |
4925439 |
- if ((ort->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ==
|
|
Neil Horman |
4925439 |
- (RTF_DEFAULT | RTF_ADDRCONF))
|
|
Neil Horman |
4925439 |
- rt6_set_from(rt, ort);
|
|
Neil Horman |
4925439 |
+ rt6_set_from(rt, ort);
|
|
Neil Horman |
4925439 |
rt->rt6i_metric = 0;
|
|
Neil Horman |
4925439 |
|
|
Neil Horman |
4925439 |
#ifdef CONFIG_IPV6_SUBTREES
|