From d8cb91e2a4a2cb2ad30f967c6ca5d67f0eda73b8 Mon Sep 17 00:00:00 2001
From: Stefano Ceccherini <stefano.ceccherini@gmail.com>
Date: Sat, 9 Nov 2013 20:43:23 +0100
Subject: [PATCH] Check if device exists before creating ethernet interface.
Fix ticket #10183.
---
.../kernel/network/devices/ethernet/ethernet.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp b/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp
index 47c701e..d989075 100644
a
|
b
|
ethernet_init(const char *name, net_device **_device)
|
124 | 124 | || !strcmp(name, "/dev/net/userland_server")) |
125 | 125 | return B_BAD_VALUE; |
126 | 126 | |
| 127 | if (access(name, F_OK) != 0) |
| 128 | return errno; |
| 129 | |
127 | 130 | status_t status = get_module(NET_BUFFER_MODULE_NAME, (module_info **)&gBufferModule); |
128 | 131 | if (status < B_OK) |
129 | 132 | return status; |