CVSROOT: /cvs Module name: src Changes by: k...@cvs.openbsd.org 2020/08/19 05:23:59
Modified files: sys/net : if.c Log message: Allow SIOCSWGDPID and SIOCSWGMAXFLOW ioctls for non-root ifconfig(8) detects switch(4) through its unique SIOCSWGDPID ioctl(2) and further does another switch specific ioctl for the default output regardless of configuration and/or members. But since these two ioctls are limited to root, running ifconfig as unprivileged user makes switch interfaces partially appear as bridge devices because the detection fails, e.g. STP parameters are shown instead of datapath id and flow parameters. ifioctl() limits a list of set/write ioctls to root, but these two read-only ioctls seem to have been listed by mistake, so remove them to omit the root check and fix "ifconfig switch" output for unprivileged users. Feedback from dlg