--- eth-multiplexer/Makefile | 2 +- eth-multiplexer/device_impl.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile index cefa0abd..2b19de6d 100644 --- a/eth-multiplexer/Makefile +++ b/eth-multiplexer/Makefile @@ -29,6 +29,6 @@ LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h HURDLIBS = ports ihash iohelp fshelp shouldbeinlibc netfs bpf LDLIBS = -lpthread -CFLAGS += -I$(top_srcdir)/libbpf +CFLAGS += -I$(top_srcdir)/libbpf -ggdb -O0 include ../Makeconf diff --git a/eth-multiplexer/device_impl.c b/eth-multiplexer/device_impl.c index d7c8beeb..b84a3309 100644 --- a/eth-multiplexer/device_impl.c +++ b/eth-multiplexer/device_impl.c @@ -96,6 +96,11 @@ ds_device_open (mach_port_t master_port, mach_port_t reply_port, kern_return_t ds_device_close (struct vether_device *device) { + if (device == NULL) + return D_NO_SUCH_DEVICE; + + destroy_vdev(device); + return 0; } -- 2.11.0