summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorMatteo Croce <mcroce@redhat.com>2018-12-01 00:26:27 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-03 16:02:43 -0800
commit59f997b088d26a774958cb7b17b0763cd82de7ec (patch)
tree69b496f969579416c1358e43b8abdce94f7af5ec /ipc/sem.c
parentfb6df5a6234c38a9c551559506a49a677ac6f07a (diff)
downloadlinux-stable-59f997b088d26a774958cb7b17b0763cd82de7ec.tar.gz
linux-stable-59f997b088d26a774958cb7b17b0763cd82de7ec.tar.bz2
linux-stable-59f997b088d26a774958cb7b17b0763cd82de7ec.zip
macvlan: return correct error value
A MAC address must be unique among all the macvlan devices with the same lower device. The only exception is the passthru [sic] mode, which shares the lower device address. When duplicate addresses are detected, EBUSY is returned when bringing the interface up: # ip link add macvlan0 link eth0 type macvlan # read addr </sys/class/net/eth0/address # ip link set macvlan0 address $addr # ip link set macvlan0 up RTNETLINK answers: Device or resource busy Use correct error code which is EADDRINUSE, and do the check also earlier, on address change: # ip link set macvlan0 address $addr RTNETLINK answers: Address already in use Signed-off-by: Matteo Croce <mcroce@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'ipc/sem.c')
0 files changed, 0 insertions, 0 deletions