]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: update dst pmtu with the correct daddr
authorXin Long <lucien.xin@gmail.com>
Thu, 20 Sep 2018 09:27:28 +0000 (17:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 18:29:30 +0000 (11:29 -0700)
commit3e632c378e1dac2312ec94b069cd650368851005
tree013a257de980989041bcdeecf8209f365d157e7c
parent9408e8c7e5277e9509718155d115c8ffe9a687d2
sctp: update dst pmtu with the correct daddr

When processing pmtu update from an icmp packet, it calls .update_pmtu
with sk instead of skb in sctp_transport_update_pmtu.

However for sctp, the daddr in the transport might be different from
inet_sock->inet_daddr or sk->sk_v6_daddr, which is used to update or
create the route cache. The incorrect daddr will cause a different
route cache created for the path.

So before calling .update_pmtu, inet_sock->inet_daddr/sk->sk_v6_daddr
should be updated with the daddr in the transport, and update it back
after it's done.

The issue has existed since route exceptions introduction.

Fixes: 6a83356234ec ("ipv4: Add FIB nexthop exceptions.")
Reported-by: ian.periam@dialogic.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/transport.c