Check if device exists before creating ethernet interface.

Fix ticket #10183.
This commit is contained in:
Stefano Ceccherini 2013-11-09 20:43:23 +01:00
parent 8e416d27ff
commit 5ae9ef055c
1 changed files with 3 additions and 0 deletions

View File

@ -124,6 +124,9 @@ ethernet_init(const char *name, net_device **_device)
|| !strcmp(name, "/dev/net/userland_server"))
return B_BAD_VALUE;
if (access(name, F_OK) != 0)
return errno;
status_t status = get_module(NET_BUFFER_MODULE_NAME, (module_info **)&gBufferModule);
if (status < B_OK)
return status;