diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-04-01 12:15:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-04 00:54:33 +0300 |
commit | df2729c3238ed89fb8ccf850d38c732858a5bade (patch) | |
tree | 77f4cee76a2e796795339fd50cde9707bd3e921a /lib/int_sqrt.c | |
parent | ac6a3722fed67c658a435187d0254ae119d845d3 (diff) | |
download | linux-df2729c3238ed89fb8ccf850d38c732858a5bade.tar.xz |
sctp: check for dst and pathmtu update in sctp_packet_config
This patch is to move sctp_transport_dst_check into sctp_packet_config
from sctp_packet_transmit and add pathmtu check in sctp_packet_config.
With this fix, sctp can update dst or pathmtu before appending chunks,
which can void dropping packets in sctp_packet_transmit when dst is
obsolete or dst's mtu is changed.
This patch is also to improve some other codes in sctp_packet_config.
It updates packet max_size with gso_max_size, checks for dst and
pathmtu, and appends ecne chunk only when packet is empty and asoc
is not NULL.
It makes sctp flush work better, as we only need to set up them once
for one flush schedule. It's also safe, since asoc is NULL only when
the packet is created by sctp_ootb_pkt_new in which it just gets the
new dst, no need to do more things for it other than set packet with
transport's pathmtu.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/int_sqrt.c')
0 files changed, 0 insertions, 0 deletions