aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/passt.c b/passt.c
index 1dc1cca..77cd48c 100644
--- a/passt.c
+++ b/passt.c
@@ -54,6 +54,7 @@
#include "util.h"
#include "passt.h"
+#include "dhcp.h"
#include "dhcpv6.h"
#include "icmp.h"
#include "tcp.h"
@@ -376,8 +377,6 @@ int main(int argc, char **argv)
}
sock_probe_mem(&c);
- proto_update_l2_buf(c.mac_guest, c.mac, &c.addr4);
-
tap_sock_init(&c);
clock_gettime(CLOCK_MONOTONIC, &now);
@@ -386,6 +385,11 @@ int main(int argc, char **argv)
(!c.no_tcp && tcp_sock_init(&c, &now)))
exit(EXIT_FAILURE);
+ proto_update_l2_buf(c.mac_guest, c.mac, &c.addr4);
+
+ if (c.v4 && !c.no_dhcp)
+ dhcp_init();
+
if (c.v6 && !c.no_dhcpv6)
dhcpv6_init(&c);