aboutgitcodebugslistschat
path: root/dhcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/dhcp.c b/dhcp.c
index 6448e51..337463a 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1,12 +1,15 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
/* PASST - Plug A Simple Socket Transport
+ * for qemu/UNIX domain socket mode
+ *
+ * PASTA - Pack A Subtle Tap Abstraction
+ * for network namespace/tap device mode
*
* dhcp.c - Minimalistic DHCP server for PASST
*
* Copyright (c) 2020-2021 Red Hat GmbH
* Author: Stefano Brivio <sbrivio@redhat.com>
- *
*/
#include <stdio.h>
@@ -21,9 +24,9 @@
#include <net/if.h>
#include <arpa/inet.h>
+#include "util.h"
#include "passt.h"
#include "dhcp.h"
-#include "util.h"
#include "tap.h"
/**
@@ -322,7 +325,7 @@ int dhcp(struct ctx *c, struct ethhdr *eh, size_t len)
memcpy(eh->h_dest, eh->h_source, ETH_ALEN);
memcpy(eh->h_source, c->mac, ETH_ALEN);
- if (tap_send(c->fd_unix, eh, len, 0) < 0)
+ if (tap_send(c, eh, len, 0) < 0)
perror("DHCP: send");
return 1;