-/* $OpenBSD: control.c,v 1.1 2024/06/02 12:28:05 florian Exp $ */
+/* $OpenBSD: control.c,v 1.2 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <errno.h>
#include <event.h>
-/* $OpenBSD: dhcp6leased.c,v 1.1 2024/06/02 12:28:05 florian Exp $ */
+/* $OpenBSD: dhcp6leased.c,v 1.2 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org>
#include <net/route.h>
#include <net/if_dl.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <netinet6/in6_var.h>
#include <arpa/inet.h>
-/* $OpenBSD: dhcp6leased.h,v 1.2 2024/06/02 12:41:46 florian Exp $ */
+/* $OpenBSD: dhcp6leased.h,v 1.3 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
int rdomain;
int running;
int link_state;
- struct ether_addr hw_address;
char lease[LEASE_SIZE];
};
-/* $OpenBSD: engine.c,v 1.2 2024/06/02 12:41:46 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.3 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org>
#include <net/route.h>
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
uint32_t if_index;
int rdomain;
int running;
- struct ether_addr hw_address;
int link_state;
uint8_t xid[XID_SIZE];
int serverid_len;
iface->rdomain = imsg_ifinfo->rdomain;
iface->running = imsg_ifinfo->running;
iface->link_state = imsg_ifinfo->link_state;
- memcpy(&iface->hw_address, &imsg_ifinfo->hw_address,
- sizeof(struct ether_addr));
LIST_INSERT_HEAD(&dhcp6leased_interfaces, iface, entries);
need_refresh = 1;
} else {
- if (memcmp(&iface->hw_address, &imsg_ifinfo->hw_address,
- sizeof(struct ether_addr)) != 0) {
- memcpy(&iface->hw_address, &imsg_ifinfo->hw_address,
- sizeof(struct ether_addr));
- need_refresh = 1;
- }
if (imsg_ifinfo->rdomain != iface->rdomain) {
iface->rdomain = imsg_ifinfo->rdomain;
need_refresh = 1;
-/* $OpenBSD: frontend.c,v 1.2 2024/06/02 12:41:46 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.3 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org>
#include <net/route.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
switch (ifa->ifa_addr->sa_family) {
case AF_LINK: {
struct if_data *if_data;
- struct sockaddr_dl *sdl;
-
- sdl = (struct sockaddr_dl *)ifa->ifa_addr;
- if ((sdl->sdl_type != IFT_ETHER &&
- sdl->sdl_type != IFT_CARP) ||
- sdl->sdl_alen != ETHER_ADDR_LEN)
- continue;
- memcpy(ifinfo.hw_address.ether_addr_octet,
- LLADDR(sdl), ETHER_ADDR_LEN);
if_data = (struct if_data *)ifa->ifa_data;
ifinfo.link_state = if_data->ifi_link_state;
if (iface == NULL) {
if ((iface = calloc(1, sizeof(*iface))) == NULL)
fatal("calloc");
- //iface->send_solicit = 1;
memcpy(&iface->ifinfo, &ifinfo, sizeof(iface->ifinfo));
LIST_INSERT_HEAD(&interfaces, iface, entries);
frontend_imsg_compose_main(IMSG_OPEN_UDPSOCK, 0,
ifinfo.running = (flags & (IFF_UP | IFF_RUNNING)) ==
(IFF_UP | IFF_RUNNING);
- if (sdl != NULL && (sdl->sdl_type == IFT_ETHER ||
- sdl->sdl_type == IFT_CARP) && sdl->sdl_alen == ETHER_ADDR_LEN)
- memcpy(ifinfo.hw_address.ether_addr_octet, LLADDR(sdl),
- ETHER_ADDR_LEN);
- else if (iface == NULL) {
- log_warnx("Could not find AF_LINK address for %s.", if_name);
- return;
- }
-
if (iface == NULL) {
if ((iface = calloc(1, sizeof(*iface))) == NULL)
fatal("calloc");
-/* $OpenBSD: parse.y,v 1.1 2024/06/02 12:28:05 florian Exp $ */
+/* $OpenBSD: parse.y,v 1.2 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2018, 2024 Florian Obser <florian@openbsd.org>
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <arpa/inet.h>
-/* $OpenBSD: printconf.c,v 1.1 2024/06/02 12:28:05 florian Exp $ */
+/* $OpenBSD: printconf.c,v 1.2 2024/06/02 13:35:52 florian Exp $ */
/*
* Copyright (c) 2024 Florian Obser <florian@openbsd.org>
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <arpa/inet.h>