Date: Thu, 11 Sep 2014 09:48:51 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Andriy Gapon <avg@FreeBSD.org> Cc: Olivier =?utf-8?B?Q29jaGFyZC1MYWJi77+9?= <olivier@cochard.me>, freebsd-net <freebsd-net@FreeBSD.org> Subject: Re: dhclient[357]: send_packet: Invalid argument Message-ID: <20140911054851.GQ17059@glebius.int.ru> In-Reply-To: <5410B026.5020703@FreeBSD.org> References: <5410AE40.9040301@FreeBSD.org> <5410B026.5020703@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 10, 2014 at 11:10:14PM +0300, Andriy Gapon wrote: A> On 10/09/2014 23:02, Andriy Gapon wrote: A> > A> > I recently performed an upgrade from a very old HEAD to a fresh one and after A> > that I started to see a lot of the following messages: A> > A> > dhclient[357]: send_packet: Invalid argument A> > A> > This is how ktrace sees them: A> > 357 dhclient CALL sendmsg(0x7,0x7fffffffd9f0,0) A> > 357 dhclient STRU struct sockaddr { AF_INET, 82.xx.xx.xx:67 } A> > 357 dhclient RET sendmsg -1 errno 22 Invalid argument A> > A> > This where the error originates according to DTrace: A> > 0 32096 rip_output:return A> > kernel`rip_send+0x46 A> > kernel`sosend_generic+0x56c A> > kernel`sosend+0x1e A> > kernel`kern_sendit+0x201 A> > kernel`sendit+0x10c A> > kernel`sys_sendmsg+0x61 A> > kernel`amd64_syscall+0x3dd A> > kernel`0xffffffff808414ab A> > A> > Looking at rip_output() I discovered r270929, https://wiki.freebsd.org/SOCK_RAW A> > Seems like the base DHCP client is affected? A> A> Oh, I've just actually noticed it: sbin/dhclient/packet.c, assemble_udp_ip_header() A> A> /* A> * While the BPF -- used for broadcasts -- expects a "true" IP header A> * with all the bytes in network byte order, the raw socket interface A> * which is used for unicasts expects the ip_len field to be in host A> * byte order. In both cases, the checksum has to be correct, so this A> * is as good a place as any to turn the bytes around again. A> */ A> if (to != INADDR_BROADCAST) A> ip.ip_len = ntohs(ip.ip_len); Fixed, thanks. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140911054851.GQ17059>