From a1f9f1210c2375b15113837f86c23df0f54ba2a3 Mon Sep 17 00:00:00 2001 From: ngie Date: Mon, 18 Aug 2014 01:21:41 +0000 Subject: Add LIBUTIL to DPADD This will fix "make checkdpadd" MFC after: 5 days PR: 192759 Approved by: rpaulo (mentor) --- sbin/dhclient/tests/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'sbin/dhclient') diff --git a/sbin/dhclient/tests/Makefile b/sbin/dhclient/tests/Makefile index b092eea..a460f7f 100644 --- a/sbin/dhclient/tests/Makefile +++ b/sbin/dhclient/tests/Makefile @@ -8,6 +8,7 @@ PLAIN_TESTS_C= option-domain-search_test SRCS.option-domain-search_test= alloc.c convert.c hash.c options.c \ tables.c fake.c option-domain-search.c CFLAGS.option-domain-search_test+= -I${.CURDIR}/.. +DPADD.option-domain-search_test= ${LIBUTIL} LDADD.option-domain-search_test= -lutil WARNS?= 2 -- cgit v1.1 From 0c2257eddc2dd0f0dbf9ac64367937490e1c09e3 Mon Sep 17 00:00:00 2001 From: glebius Date: Thu, 11 Sep 2014 05:48:39 +0000 Subject: Since r270929 raw sockets expect network byte order. Submitted by: avg --- sbin/dhclient/packet.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'sbin/dhclient') diff --git a/sbin/dhclient/packet.c b/sbin/dhclient/packet.c index f79ca2f..859f48b 100644 --- a/sbin/dhclient/packet.c +++ b/sbin/dhclient/packet.c @@ -127,17 +127,6 @@ assemble_udp_ip_header(unsigned char *buf, int *bufix, u_int32_t from, ip.ip_dst.s_addr = to; ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0)); - - /* - * While the BPF -- used for broadcasts -- expects a "true" IP header - * with all the bytes in network byte order, the raw socket interface - * which is used for unicasts expects the ip_len field to be in host - * byte order. In both cases, the checksum has to be correct, so this - * is as good a place as any to turn the bytes around again. - */ - if (to != INADDR_BROADCAST) - ip.ip_len = ntohs(ip.ip_len); - memcpy(&buf[*bufix], &ip, sizeof(ip)); *bufix += sizeof(ip); -- cgit v1.1