[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 03 Dec 2018 16:03:09 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: mcroce@...hat.com
Cc: netdev@...r.kernel.org, kaber@...sh.net,
jeffrey.t.kirsher@...el.com, alexander.h.duyck@...el.com
Subject: Re: [PATCH net] macvlan: return correct error value
From: Matteo Croce <mcroce@...hat.com>
Date: Sat, 1 Dec 2018 00:26:27 +0100
> 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@...hat.com>
Applied, thanks Matteo.
Powered by blists - more mailing lists