[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3.4] xen-netback: allow changing the MAC address of the interface

From: Matt Wilson <msw@xxxxxxxxxx>

Sometimes it is useful to be able to change the MAC address of the
interface for netback devices. For example, when using ebtables it may
be useful to be able to distinguish traffic from different interfaces
without depending on the interface name.

Reported-by: Nikita Borzykh <sample.n@xxxxxxxxx>
Reported-by: Paul Harvey <stockingpaul@xxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: xen-devel@xxxxxxxxxxxxx
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Matt Wilson <msw@xxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
(cherry picked from commit 4a633a602c26497b8285a202830829d3be007c7b)

Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
Tested-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
 drivers/net/xen-netback/interface.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/xen-netback/interface.c 
index cfaaf68..13aa5c1 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -239,6 +239,8 @@ static const struct net_device_ops xenvif_netdev_ops = {
        .ndo_stop       = xenvif_close,
        .ndo_change_mtu = xenvif_change_mtu,
        .ndo_fix_features = xenvif_fix_features,
+       .ndo_set_mac_address = eth_mac_addr,
+       .ndo_validate_addr   = eth_validate_addr,
 struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.