From owner-svn-src-head@FreeBSD.ORG Thu Sep 11 05:48:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E650775B; Thu, 11 Sep 2014 05:48:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D197DFC1; Thu, 11 Sep 2014 05:48:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8B5mdP5014323; Thu, 11 Sep 2014 05:48:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B5md65014322; Thu, 11 Sep 2014 05:48:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409110548.s8B5md65014322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 11 Sep 2014 05:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271418 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 05:48:40 -0000 Author: glebius Date: Thu Sep 11 05:48:39 2014 New Revision: 271418 URL: http://svnweb.freebsd.org/changeset/base/271418 Log: Since r270929 raw sockets expect network byte order. Submitted by: avg Modified: head/sbin/dhclient/packet.c Modified: head/sbin/dhclient/packet.c ============================================================================== --- head/sbin/dhclient/packet.c Thu Sep 11 03:16:57 2014 (r271417) +++ head/sbin/dhclient/packet.c Thu Sep 11 05:48:39 2014 (r271418) @@ -127,17 +127,6 @@ assemble_udp_ip_header(unsigned char *bu 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);