PERFORCE change 1135077 for review

Brooks Davis brooks at FreeBSD.org
Fri Oct 18 16:27:25 UTC 2013


http://p4web.freebsd.org/@@1135077?ac=10

Change 1135077 by brooks at 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


More information about the p4-projects mailing list