All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bgmac: validate MAC addr
@ 2013-02-06  9:37 Rafał Miłecki
  2013-02-06 17:11 ` Florian Fainelli
  2013-02-07 10:14 ` [PATCH V2] " Rafał Miłecki
  0 siblings, 2 replies; 6+ messages in thread
From: Rafał Miłecki @ 2013-02-06  9:37 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: Rafał Miłecki


Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 drivers/net/ethernet/broadcom/bgmac.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index af149a3..9f95089 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1290,6 +1290,11 @@ static int bgmac_probe(struct bcma_device *core)
 		return -ENOTSUPP;
 	}
 
+	if (!is_valid_ether_addr(mac)) {
+		dev_err(&core->dev, "Invalid MAC addr: %pM\n", mac);
+		return -EADDRNOTAVAIL;
+	}
+
 	/* Allocation and references */
 	net_dev = alloc_etherdev(sizeof(*bgmac));
 	if (!net_dev)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-08 22:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06  9:37 [PATCH] bgmac: validate MAC addr Rafał Miłecki
2013-02-06 17:11 ` Florian Fainelli
2013-02-07 10:14 ` [PATCH V2] " Rafał Miłecki
2013-02-07 10:19   ` Florian Fainelli
2013-02-07 10:27   ` [PATCH V3] bgmac: validate (and random if needed) " Rafał Miłecki
2013-02-08 22:42     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.