From owner-svn-src-head@FreeBSD.ORG Thu Sep 11 08:57:57 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 DA224495; Thu, 11 Sep 2014 08:57:57 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB7E3B7; Thu, 11 Sep 2014 08:57:56 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA03129; Thu, 11 Sep 2014 11:57:54 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XS0CQ-00012W-EM; Thu, 11 Sep 2014 11:57:54 +0300 Message-ID: <541163C0.2080903@FreeBSD.org> Date: Thu, 11 Sep 2014 11:56:32 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Robert Watson , Gleb Smirnoff Subject: Re: svn commit: r271418 - head/sbin/dhclient References: <201409110548.s8B5md65014322@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org 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 08:57:58 -0000 On 11/09/2014 11:11, Robert Watson wrote: > A bit behind on commits, but: does this mean that an older userspace dhclient > will no longer work with a newer kernel? At least in my case it appeared to work. I guess this is because the broadcast queries were not affected by the change. > On Thu, 11 Sep 2014, Gleb Smirnoff wrote: > >> 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); >> >> >> > -- Andriy Gapon