diff options
author | fan.du <fan.du@windriver.com> | 2013-08-02 04:45:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-02 21:36:00 +0200 |
commit | d27fc78208b53ccdfd6a57d4ac44a459ca66806f (patch) | |
tree | 700f653b85cac0da64bdcbfb86021a4da07cd3d9 /net/sctp/ipv6.c | |
parent | Merge branch 'eth_alen' (diff) | |
download | linux-d27fc78208b53ccdfd6a57d4ac44a459ca66806f.tar.xz linux-d27fc78208b53ccdfd6a57d4ac44a459ca66806f.zip |
sctp: Don't lookup dst if transport dst is still valid
When sctp sits on IPv6, sctp_transport_dst_check pass cookie as ZERO,
as a result ip6_dst_check always fail out. This behaviour makes
transport->dst useless, because every sctp_packet_transmit must look
for valid dst.
Add a dst_cookie into sctp_transport, and set the cookie whenever we
get new dst for sctp_transport. So dst validness could be checked
against it.
Since I have split genid for IPv4 and IPv6, also delete/add IPv6 address
will also bump IPv6 genid. So issues we discussed in:
http://marc.info/?l=linux-netdev&m=137404469219410&w=4
have all been sloved for this patch.
Signed-off-by: Fan Du <fan.du@windriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r-- | net/sctp/ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 85d688f59e6a..5a9402e3c0cf 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -351,7 +351,7 @@ out: rt = (struct rt6_info *)dst; t->dst = dst; - + t->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; pr_debug("rt6_dst:%pI6 rt6_src:%pI6\n", &rt->rt6i_dst.addr, &fl6->saddr); } else { |