svn commit: r252615 - head/sbin/dhclient
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Jul 3 21:49:11 UTC 2013
Author: pjd
Date: Wed Jul 3 21:49:10 2013
New Revision: 252615
URL: http://svnweb.freebsd.org/changeset/base/252615
Log:
MFp4 @229471:
Remove unused argument from assemble_hw_header().
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Modified:
head/sbin/dhclient/bpf.c
head/sbin/dhclient/dhcpd.h
head/sbin/dhclient/packet.c
Modified: head/sbin/dhclient/bpf.c
==============================================================================
--- head/sbin/dhclient/bpf.c Wed Jul 3 21:45:29 2013 (r252614)
+++ head/sbin/dhclient/bpf.c Wed Jul 3 21:49:10 2013 (r252615)
@@ -260,7 +260,7 @@ send_packet(struct interface_info *inter
/* 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);
Modified: head/sbin/dhclient/dhcpd.h
==============================================================================
--- head/sbin/dhclient/dhcpd.h Wed Jul 3 21:45:29 2013 (r252614)
+++ head/sbin/dhclient/dhcpd.h Wed Jul 3 21:49:10 2013 (r252615)
@@ -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 *);
Modified: head/sbin/dhclient/packet.c
==============================================================================
--- head/sbin/dhclient/packet.c Wed Jul 3 21:45:29 2013 (r252614)
+++ head/sbin/dhclient/packet.c Wed Jul 3 21:49:10 2013 (r252615)
@@ -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));
More information about the svn-src-head
mailing list