-/* $OpenBSD: bpf.c,v 1.55 2017/07/03 22:06:11 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.56 2017/07/07 15:14:47 krw Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
dest.sin_addr.s_addr = to.s_addr;
if (to.s_addr == INADDR_BROADCAST) {
- assemble_eh_header(ifi, &eh);
+ assemble_eh_header(ifi->hw_address, &eh);
iov[0].iov_base = &eh;
iov[0].iov_len = sizeof(eh);
iovcnt++;
-/* $OpenBSD: dhcpd.h,v 1.205 2017/07/07 14:53:06 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.206 2017/07/07 15:14:47 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
void routehandler(struct interface_info *, int);
/* packet.c */
-void assemble_eh_header(struct interface_info *, struct ether_header *);
+void assemble_eh_header(struct ether_addr, struct ether_header *);
ssize_t decode_hw_header(unsigned char *, u_int32_t, struct ether_addr *);
ssize_t decode_udp_ip_header(unsigned char *, u_int32_t, struct sockaddr_in *);
u_int32_t checksum(unsigned char *, u_int32_t, u_int32_t);
-/* $OpenBSD: packet.c,v 1.35 2017/04/18 13:59:09 krw Exp $ */
+/* $OpenBSD: packet.c,v 1.36 2017/07/07 15:14:47 krw Exp $ */
/* Packet assembly code, originally contributed by Archie Cobbs. */
}
void
-assemble_eh_header(struct interface_info *ifi, struct ether_header *eh)
+assemble_eh_header(struct ether_addr shost, struct ether_header *eh)
{
memset(eh->ether_dhost, 0xff, sizeof(eh->ether_dhost));
- memcpy(eh->ether_shost, ifi->hw_address.ether_addr_octet,
+ memcpy(eh->ether_shost, shost.ether_addr_octet,
sizeof(eh->ether_shost));
eh->ether_type = htons(ETHERTYPE_IP);