]> git.baikalelectronics.ru Git - kernel.git/commit
net: tcp_probe: adapt tbuf size for recent changes
authorDaniel Borkmann <dborkman@redhat.com>
Tue, 3 Sep 2013 16:24:02 +0000 (18:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 04:27:28 +0000 (00:27 -0400)
commit41d2edee97a5810e87689a0f3a5b319278d9ada9
tree27f65c0861fc098f030f4411f20a32e17a2cb83a
parent725885255c5f2969e6bc53c9771951a6ebda0cce
net: tcp_probe: adapt tbuf size for recent changes

With recent changes in tcp_probe module (e.g. 9bc34fba8b ("net: tcp_probe:
add IPv6 support")) we also need to take into account that tbuf needs to
be updated as format string will be further expanded. tbuf sits on the stack
in tcpprobe_read() function that is invoked when user space reads procfs
file /proc/net/tcpprobe, hence not fast path as in jtcp_rcv_established().
Having a size similarly as in sctp_probe module of 256 bytes is fully
sufficient for that, we need theoretical maximum of 252 bytes otherwise we
could get truncated.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_probe.c