]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: sctp_transport_dst_check should check if transport pmtu is dst mtu
authorXin Long <lucien.xin@gmail.com>
Fri, 17 Feb 2017 08:41:45 +0000 (16:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Feb 2017 23:19:37 +0000 (18:19 -0500)
commit035425f2e050d679e9481e01492934a07c317ae5
tree84d8c1c06593e5671bef4d666f12f4ede62a2dd5
parent88a3c364e6f34366fc1b52931275e8bf8714818a
sctp: sctp_transport_dst_check should check if transport pmtu is dst mtu

Now when sending a packet, sctp_transport_dst_check will check if dst
is obsolete by calling ipv4/ip6_dst_check. But they return obsolete
only when adding a new cache, after that when the cache's pmtu is
updated again, it will not trigger transport->dst/pmtu's update.

It can be reproduced by reducing route's pmtu twice. At the 1st time
client will add a new cache, and transport->pathmtu gets updated as
sctp_transport_dst_check finds it's obsolete. But at the 2nd time,
cache's mtu is updated, sctp client will never send out any packet,
because transport->pmtu has no chance to update.

This patch is to fix this by also checking if transport pmtu is dst
mtu in sctp_transport_dst_check, so that transport->pmtu can be
updated on time.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/sctp.h