]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: introduce sctp_mtu_payload
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 26 Apr 2018 19:58:54 +0000 (16:58 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 18:35:23 +0000 (14:35 -0400)
commitba7a31b98b31d0852a555b2ae082eaafb9ebbec0
tree5103795b3aed0972f3be763097c9b9c11efda77f
parentb2b6bbf9bcd2295aa9cfa29b9eafa392010bffb4
sctp: introduce sctp_mtu_payload

When given a MTU, this function calculates how much payload we can carry
on it. Without a MTU, it calculates the amount of header overhead we
have.

So that when we have extra overhead, like the one added for IP options
on SELinux patches, it is easier to handle it.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/sctp.h
net/sctp/output.c
net/sctp/socket.c