]> Zhao Yanbai Git Server - minix.git/commitdiff
LWIP - avoid crash when an unknown driver come up
authorTomas Hruby <tom@minix3.org>
Thu, 7 Feb 2013 09:49:52 +0000 (09:49 +0000)
committerLionel Sambuc <lionel@minix3.org>
Mon, 25 Mar 2013 15:51:25 +0000 (16:51 +0100)
servers/lwip/driver.c

index a1c5a531810a6bf13963e05692a018166ebace7e..473689ac7d7e60fad3efaffa105dbea8775e53ce 100644 (file)
@@ -403,9 +403,11 @@ void driver_up(const char * label, endpoint_t ep)
                debug_print("LWIP : driver '%s' / %d is up for /dev/%s\n",
                                label, ep, nic->name);
                nic->drv_ep = ep;
-       } else
+       } else {
                printf("LWIP : WARNING unexpected driver '%s' up event\n",
                                                                label);
+               return;
+       }
 
        nic->state = DRV_IDLE;