]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: always set the new created dst's from in ip6_rt_copy
authorLi RongQing <roy.qing.li@gmail.com>
Thu, 19 Dec 2013 04:40:26 +0000 (12:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Dec 2013 23:35:21 +0000 (18:35 -0500)
commitb91b2338a9f835d9d556b144810d58517cb44042
treefe53a5a19fc028aaa1714298a9e2a87730c8366d
parentf771616f19cf0f467649e0ff8fce6765d8155fa0
ipv6: always set the new created dst's from in ip6_rt_copy

ip6_rt_copy only sets dst.from if ort has flag RTF_ADDRCONF and RTF_DEFAULT.
but the prefix routes which did get installed by hand locally can have an
expiration, and no any flag combination which can ensure a potential from
does never expire, so we should always set the new created dst's from.

This also fixes the new created dst is always expired since the ort, which
is created by RA, maybe has RTF_EXPIRES and RTF_ADDRCONF, but no RTF_DEFAULT.

Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
CC: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c