summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhcp6leased/control.c3
-rw-r--r--sbin/dhcp6leased/dhcp6leased.c3
-rw-r--r--sbin/dhcp6leased/dhcp6leased.h3
-rw-r--r--sbin/dhcp6leased/engine.c12
-rw-r--r--sbin/dhcp6leased/frontend.c22
-rw-r--r--sbin/dhcp6leased/parse.y3
-rw-r--r--sbin/dhcp6leased/printconf.c3
7 files changed, 7 insertions, 42 deletions
diff --git a/sbin/dhcp6leased/control.c b/sbin/dhcp6leased/control.c
index 9ded3132d13..5bc63c11af5 100644
--- a/sbin/dhcp6leased/control.c
+++ b/sbin/dhcp6leased/control.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -24,7 +24,6 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <errno.h>
#include <event.h>
diff --git a/sbin/dhcp6leased/dhcp6leased.c b/sbin/dhcp6leased/dhcp6leased.c
index 0165e350088..1884fb6516c 100644
--- a/sbin/dhcp6leased/dhcp6leased.c
+++ b/sbin/dhcp6leased/dhcp6leased.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -32,7 +32,6 @@
#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>
diff --git a/sbin/dhcp6leased/dhcp6leased.h b/sbin/dhcp6leased/dhcp6leased.h
index dc3c825f1e4..e974657d87e 100644
--- a/sbin/dhcp6leased/dhcp6leased.h
+++ b/sbin/dhcp6leased/dhcp6leased.h
@@ -1,4 +1,4 @@
-/* $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>
@@ -217,7 +217,6 @@ struct imsg_ifinfo {
int rdomain;
int running;
int link_state;
- struct ether_addr hw_address;
char lease[LEASE_SIZE];
};
diff --git a/sbin/dhcp6leased/engine.c b/sbin/dhcp6leased/engine.c
index 96514feba0c..2a18022b857 100644
--- a/sbin/dhcp6leased/engine.c
+++ b/sbin/dhcp6leased/engine.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -30,7 +30,6 @@
#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>
@@ -93,7 +92,6 @@ struct dhcp6leased_iface {
uint32_t if_index;
int rdomain;
int running;
- struct ether_addr hw_address;
int link_state;
uint8_t xid[XID_SIZE];
int serverid_len;
@@ -604,17 +602,9 @@ engine_update_iface(struct imsg_ifinfo *imsg_ifinfo)
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;
diff --git a/sbin/dhcp6leased/frontend.c b/sbin/dhcp6leased/frontend.c
index 3fd768fca64..94f5ff09b23 100644
--- a/sbin/dhcp6leased/frontend.c
+++ b/sbin/dhcp6leased/frontend.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -32,7 +32,6 @@
#include <net/route.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
@@ -555,15 +554,6 @@ update_iface(uint32_t if_index)
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;
@@ -580,7 +570,6 @@ update_iface(uint32_t if_index)
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,
@@ -628,15 +617,6 @@ XXX
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");
diff --git a/sbin/dhcp6leased/parse.y b/sbin/dhcp6leased/parse.y
index 8fb7778fa3b..08943ef345e 100644
--- a/sbin/dhcp6leased/parse.y
+++ b/sbin/dhcp6leased/parse.y
@@ -1,4 +1,4 @@
-/* $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>
@@ -31,7 +31,6 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <arpa/inet.h>
diff --git a/sbin/dhcp6leased/printconf.c b/sbin/dhcp6leased/printconf.c
index a38a652658e..7f69e2d7ca9 100644
--- a/sbin/dhcp6leased/printconf.c
+++ b/sbin/dhcp6leased/printconf.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -25,7 +25,6 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#include <arpa/inet.h>