Check if device exists before creating ethernet interface.
Fix ticket #10183.
This commit is contained in:
parent
8e416d27ff
commit
5ae9ef055c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue