diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-02-28 22:25:11 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-02-29 09:48:03 +0100 |
commit | 04d3d026032415cac1c3083ffaf56977da27c3a7 (patch) | |
tree | aa5f5f696f1eb64a71b45d60d481972c6ccef703 /fwd.h | |
parent | 0f938c3b9a9dbc854c1d2e33fab5af41b4a660c8 (diff) | |
download | passt-04d3d026032415cac1c3083ffaf56977da27c3a7.tar passt-04d3d026032415cac1c3083ffaf56977da27c3a7.tar.gz passt-04d3d026032415cac1c3083ffaf56977da27c3a7.tar.bz2 passt-04d3d026032415cac1c3083ffaf56977da27c3a7.tar.lz passt-04d3d026032415cac1c3083ffaf56977da27c3a7.tar.xz passt-04d3d026032415cac1c3083ffaf56977da27c3a7.tar.zst passt-04d3d026032415cac1c3083ffaf56977da27c3a7.zip |
tcp_splice: More specific variable names in new splice path
In tcp_splice_conn_from_sock(), the 'port' variable stores the source
port of the connection on the originating side. In tcp_splice_new(),
called directly from it, the 'port' parameter gives the _destination_
port of the originating connection and is then updated to the
destination port of the connection on the other side.
Similarly, in tcp_splice_conn_from_sock(), 's' is the fd of the
accetped socket (on side 0), whereas in tcp_splice_new(), 's' is the
fd of the connecting socket (side 1).
I, for one, find having the same variable name with different meanings
in such close proximity in the flow of control pretty confusing.
Alter the names for greater specificity and clarity.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'fwd.h')
0 files changed, 0 insertions, 0 deletions