+ for (try = 1; TRUE; try++) {
+ error = nfs_mountroot();
+ if (error == 0) {
+ break;
+ }
+ printf("netboot: nfs_mountroot() attempt %u failed; "
+ "clearing ARP entry and trying again\n", try);
+ /*
+ * error is either EHOSTDOWN or EHOSTUNREACH, which likely means
+ * that the port we're plugged into has spanning tree enabled,
+ * and either the router or the server can't answer our ARP
+ * requests. Clear the incomplete ARP entry by removing the
+ * appropriate route, depending on the error code:
+ * EHOSTDOWN NFS server's route
+ * EHOSTUNREACH router's route
+ */
+ switch (error) {
+ default:
+ /* NOT REACHED */
+ case EHOSTDOWN:
+ /* remove the server's arp entry */
+ error = host_route_delete(S_netboot_info_p->server_ip);
+ if (error) {
+ printf("netboot: host_route_delete(" IP_FORMAT
+ ") failed %d\n",
+ IP_LIST(&S_netboot_info_p->server_ip), error);
+ }
+ break;
+ case EHOSTUNREACH:
+ error = host_route_delete(router);
+ if (error) {
+ printf("netboot: host_route_delete(" IP_FORMAT
+ ") failed %d\n", IP_LIST(&router), error);
+ }
+ break;
+ }
+ }