summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2013-07-03 21:49:10 +0000
committerpjd <pjd@FreeBSD.org>2013-07-03 21:49:10 +0000
commitb1d67fde75321e5b768664986d6418424a830675 (patch)
tree2c17fd7cebf4c0d2369111cdf5c630ff15c98c29 /sbin
parente5e94b722420572a67052e000b5342a26cb616a4 (diff)
downloadFreeBSD-src-b1d67fde75321e5b768664986d6418424a830675.zip
FreeBSD-src-b1d67fde75321e5b768664986d6418424a830675.tar.gz
MFp4 @229471:
Remove unused argument from assemble_hw_header(). Reviewed by: brooks Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/bpf.c2
-rw-r--r--sbin/dhclient/dhcpd.h3
-rw-r--r--sbin/dhclient/packet.c7
3 files changed, 4 insertions, 8 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index 4dfe1f0..6cf4358 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -260,7 +260,7 @@ send_packet(struct interface_info *interface, struct dhcp_packet *raw,
/* Assemble the headers... */
if (to->sin_addr.s_addr == INADDR_BROADCAST)
- assemble_hw_header(interface, buf, &bufp, NULL);
+ assemble_hw_header(interface, buf, &bufp);
assemble_udp_ip_header(buf, &bufp, from.s_addr,
to->sin_addr.s_addr, to->sin_port, (unsigned char *)raw, len);
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index 346e2ce..920235b 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -405,8 +405,7 @@ void bootp(struct packet *);
void dhcp(struct packet *);
/* packet.c */
-void assemble_hw_header(struct interface_info *, unsigned char *,
- int *, struct hardware *);
+void assemble_hw_header(struct interface_info *, unsigned char *, int *);
void assemble_udp_ip_header(unsigned char *, int *, u_int32_t, u_int32_t,
unsigned int, unsigned char *, int);
ssize_t decode_hw_header(unsigned char *, int, struct hardware *);
diff --git a/sbin/dhclient/packet.c b/sbin/dhclient/packet.c
index 39cf16d..f79ca2f 100644
--- a/sbin/dhclient/packet.c
+++ b/sbin/dhclient/packet.c
@@ -90,14 +90,11 @@ wrapsum(u_int32_t sum)
void
assemble_hw_header(struct interface_info *interface, unsigned char *buf,
- int *bufix, struct hardware *to)
+ int *bufix)
{
struct ether_header eh;
- if (to != NULL && to->hlen == 6) /* XXX */
- memcpy(eh.ether_dhost, to->haddr, sizeof(eh.ether_dhost));
- else
- memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost));
+ memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost));
if (interface->hw_address.hlen == sizeof(eh.ether_shost))
memcpy(eh.ether_shost, interface->hw_address.haddr,
sizeof(eh.ether_shost));
OpenPOWER on IntegriCloud