diff options
| author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2018-04-26 15:58:57 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-04-27 14:35:23 -0400 |
| commit | 6ff0f871c20ec1769a481edca86f23c76b2b06d3 (patch) | |
| tree | 9fa281c225263df1e1b00e12adfeedfdb6e690f1 /net/sctp/transport.c | |
| parent | 2521680e1830c21033efe48322829044c6e6b32b (diff) | |
sctp: introduce sctp_dst_mtu
Which makes sure that the MTU respects the minimum value of
SCTP_DEFAULT_MINSEGMENT and that it is correctly aligned.
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/transport.c')
| -rw-r--r-- | net/sctp/transport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index c5fc3aed08a1..ed73a9d91b83 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
| @@ -242,9 +242,9 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk) | |||
| 242 | &transport->fl, sk); | 242 | &transport->fl, sk); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | if (transport->dst) { | 245 | if (transport->dst) |
| 246 | transport->pathmtu = SCTP_TRUNC4(dst_mtu(transport->dst)); | 246 | transport->pathmtu = sctp_dst_mtu(transport->dst); |
| 247 | } else | 247 | else |
| 248 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 248 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |
| 249 | } | 249 | } |
| 250 | 250 | ||
