system-linux: set pending to 0 on ifindex found or error for if_get_master
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 17 Dec 2023 15:47:16 +0000 (16:47 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 4 Jan 2024 12:35:39 +0000 (13:35 +0100)
commitb635a09cdadf25126be22d4e3abc1c1e625518b1
tree07b8dee3ba9b6cf4fed3d0e85b71c83fbce9a49b
parentb9442415c785e1fa58a0718606991fa51fa5e5d3
system-linux: set pending to 0 on ifindex found or error for if_get_master

Fix Coverity Defect 1559194 reporting an Infinite loop when
data->pending is not set to 0 on finishing the callback.

While this is a false-positive report as ACK is always called, this is a
good time to optimize the code and make the callback exit early if we
find the ifindex for the DSA conduit.

Correctly set pending to 0 on ifindex found or error for if_get_master
valid netlink callback.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
system-linux.c