Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2013 16:27:25 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 1135077 for review
Message-ID:  <201310181627.r9IGRP2J093611@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1135077?ac=10

Change 1135077 by brooks@brooks_zenith on 2013/10/18 16:26:32

	Be slightly more picky about ethernet addresses we get from
	flash and reject all-zeros and multicast address.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#15 edit

Differences ...

==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#15 (text+ko) ====

@@ -726,6 +726,22 @@
 		goto get_random;
 	}
 
+	if (sc->atse_eth_addr[0] == 0x00 && sc->atse_eth_addr[1] == 0x00 &&
+	    sc->atse_eth_addr[2] == 0x00 && sc->atse_eth_addr[3] == 0x00 &&
+	    sc->atse_eth_addr[4] == 0x00 && sc->atse_eth_addr[5] == 0x00) {
+		device_printf(sc->atse_dev, "All zero's Ethernet hardware "
+		    "address blacklisted.  Falling back to random address.\n");
+		device_printf(sc->atse_dev, "Please re-program your flash.\n");
+		goto get_random;
+	}
+
+	if (ETHER_IS_MULTICAST(sc->atse_eth_addr)) {
+		device_printf(sc->atse_dev, "Multicast Ethernet hardware "
+		    "address blacklisted.  Falling back to random address.\n");
+		device_printf(sc->atse_dev, "Please re-program your flash.\n");
+		goto get_random;
+	}
+
 	/*
 	 * If we find an Altera prefixed address with a 0x0 ending
 	 * adjust by device unit.  If not and this is not the first



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310181627.r9IGRP2J093611>