ipv6: copy prefsrc setting when copying route entry
authorFlorian Westphal <fw@strlen.de>
Fri, 20 May 2011 11:27:24 +0000 (11:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 May 2011 06:05:22 +0000 (02:05 -0400)
commit c3968a857a6b6c3d2ef4ead35776b055fb664d74
('ipv6: RTA_PREFSRC support for ipv6 route source address selection')
added support for ipv6 prefsrc as an alternative to ipv6 addrlabels,
but it did not work because the prefsrc entry was not copied.

Cc: Daniel Walter <sahne@0x90.at>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index f1be5c5c85ef6c0256b6d1d3e0939a606c633722..de2b1decd78668d832937cf525115152411bb075 100644 (file)
@@ -1756,6 +1756,7 @@ static struct rt6_info * ip6_rt_copy(struct rt6_info *ort)
 #ifdef CONFIG_IPV6_SUBTREES
                memcpy(&rt->rt6i_src, &ort->rt6i_src, sizeof(struct rt6key));
 #endif
+               memcpy(&rt->rt6i_prefsrc, &ort->rt6i_prefsrc, sizeof(struct rt6key));
                rt->rt6i_table = ort->rt6i_table;
        }
        return rt;