mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
selftests: mptcp: fix incorrect fd checks in main_loop
commit7335d4ac81upstream. Fix a bug where the code was checking the wrong file descriptors when opening the input files. The code was checking 'fd' instead of 'fd_in', which could lead to incorrect error handling. Fixes:05be5e273c("selftests: mptcp: add disconnect tests") Cc: stable@vger.kernel.org Fixes:ca7ae89160("selftests: mptcp: mptfo Initiator/Listener") Co-developed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Cong Liu <liucong2@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250328-net-mptcp-misc-fixes-6-15-v1-2-34161a482a7f@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6ddb752893
commit
342e3375f9
@@ -1270,7 +1270,7 @@ int main_loop(void)
|
||||
|
||||
if (cfg_input && cfg_sockopt_types.mptfo) {
|
||||
fd_in = open(cfg_input, O_RDONLY);
|
||||
if (fd < 0)
|
||||
if (fd_in < 0)
|
||||
xerror("can't open %s:%d", cfg_input, errno);
|
||||
}
|
||||
|
||||
@@ -1293,7 +1293,7 @@ again:
|
||||
|
||||
if (cfg_input && !cfg_sockopt_types.mptfo) {
|
||||
fd_in = open(cfg_input, O_RDONLY);
|
||||
if (fd < 0)
|
||||
if (fd_in < 0)
|
||||
xerror("can't open %s:%d", cfg_input, errno);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user