diff options
author | Justus Winter <justus@gnupg.org> | 2016-11-05 18:41:13 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-11-05 18:47:09 +0100 |
commit | 54c6736341bda9564a028ad3d61d46488e53b8a6 (patch) | |
tree | 0e27d98a6ace8074b63a5ab60576c292ffbd529b /eth-multiplexer/Makefile | |
parent | 115695afe34e5253816ff0e828054f8c07e2ddbd (diff) |
eth-multiplexer: Generate stable ethernet addresses.
Previously, the ethernet multiplexer generated ethernet addresses for
the virtual interfaces using a pseudo-random number generator. This
has the downside of generating a new address every time. Generate
stable pseudo-random addresses instead.
* eth-multiplexer/Makefile (HURDLIBS): Link to libihash.
* eth-multiplexer/ethernet.c (ether_address): New variable.
(get_ethernet_address): New function.
(ethernet_open): Get the ethernet address of the real interface.
* eth-multiplexer/ethernet.h (ether_address): New declaration.
* eth-multiplexer/vdev.c (add_vdev): Compute the ethernet address by
hashing the address of the real interface with the name of the virtual
interface.
Diffstat (limited to 'eth-multiplexer/Makefile')
-rw-r--r-- | eth-multiplexer/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile index 35110a80..07f909e7 100644 --- a/eth-multiplexer/Makefile +++ b/eth-multiplexer/Makefile @@ -26,7 +26,7 @@ MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" OBJS = $(SRCS:.c=.o) $(MIGSTUBS) LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h -HURDLIBS=ports fshelp shouldbeinlibc netfs bpf +HURDLIBS = ports ihash fshelp shouldbeinlibc netfs bpf LDLIBS = -lpthread CFLAGS += -I$(top_srcdir)/libbpf |