[PATCH RFC 2/3] net/lo: Ensure lo devices have a MAC address

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

 



From: Chuck Lever <chuck.lever@xxxxxxxxxx>

A non-zero MAC address enables a network device to be assigned as
the underlying device for a virtual RDMA device. Without a non-
zero MAC address, cma_acquire_dev_by_src_ip() is unable to find the
underlying egress device that corresponds to a source IP address,
and rdma_resolve_address() fails.

Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
---
 drivers/net/loopback.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index f6d53e63ef4e..1ce4f19d8065 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -192,6 +192,8 @@ static void gen_lo_setup(struct net_device *dev,
 	dev->needs_free_netdev	= true;
 	dev->priv_destructor	= dev_destructor;
 
+	eth_hw_addr_random(dev);
+
 	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
 }
 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux