xen-netback: allow changing the MAC address of the interface
authorMatt Wilson <[email protected]>
Tue, 22 Jan 2013 08:08:25 +0000 (08:08 +0000)
committerDavid S. Miller <[email protected]>
Wed, 23 Jan 2013 18:42:20 +0000 (13:42 -0500)
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 <[email protected]>
Reported-by: Paul Harvey <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Konrad Rzeszutek Wilk <[email protected]>
Acked-by: Ian Campbell <[email protected]>
Signed-off-by: Matt Wilson <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/xen-netback/interface.c

index b7d41f8c338a8372cea8bfe6649386c6a0d8b090..f733cae3d4b643618cec69f4aeadd84044eff7bd 100644 (file)
@@ -238,6 +238,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,