Skip to content

Commit 4e04aa7

Browse files
committed
mctp-ops: fix sysfs link-resolution check
We have the logic inverted when checking that the resolved /sys/class/net/ path is within /sys. Fixes: 3317571 ("mctpd: resolve sysfs paths for links") Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
1 parent 4186b5a commit 4e04aa7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mctp-ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int mctp_op_link_sysfs_path(const char *ifname, char **path)
7070
goto out;
7171
}
7272

73-
if (!strncmp(dev_path, "/sys", strlen("/sys"))) {
73+
if (strncmp(dev_path, "/sys", strlen("/sys"))) {
7474
warnx("malformed interface path for %s", ifname);
7575
goto out;
7676
}

0 commit comments

Comments
 (0)