Date: Thu, 11 Sep 2014 09:11:51 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r271418 - head/sbin/dhclient Message-ID: <alpine.BSF.2.11.1409110911210.54235@fledge.watson.org> In-Reply-To: <201409110548.s8B5md65014322@svn.freebsd.org> References: <201409110548.s8B5md65014322@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
A bit behind on commits, but: does this mean that an older userspace dhclient will no longer work with a newer kernel? Robert 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); > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1409110911210.54235>