diff options
Diffstat (limited to 'dhcp.c')
-rw-r--r-- | dhcp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |