Skip to content
Commit d95a5620 authored by Remi Pommarel's avatar Remi Pommarel Committed by Jakub Kicinski
Browse files

net: bridge: fix ioctl old_deviceless bridge argument

Commit 561d8352 ("bridge: use ndo_siocdevprivate") changed the
source and destination arguments of copy_{to,from}_user in bridge's
old_deviceless() from args[1] to uarg breaking SIOC{G,S}IFBR ioctls.

Commit cbd7ad29 ("net: bridge: fix ioctl old_deviceless bridge
argument") fixed only BRCTL_{ADD,DEL}_BRIDGES commands leaving
BRCTL_GET_BRIDGES one untouched.

The fixes BRCTL_GET_BRIDGES as well and has been tested with busybox's
brctl.

Example of broken brctl:
$ brctl show
bridge name     bridge id               STP enabled     interfaces
brctl: can't get bridge name for index 0: No such device or address

Example of fixed brctl:
$ brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.000000000000       no

Fixes: 561d8352

 ("bridge: use ndo_siocdevprivate")
Signed-off-by: default avatarRemi Pommarel <repk@triplefau.lt>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
Link: https://lore.kernel.org/all/20211223153139.7661-2-repk@triplefau.lt/


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent eccffcf4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment