From owner-freebsd-net@FreeBSD.ORG Tue Apr 7 14:53:55 2015 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF1C5846 for ; Tue, 7 Apr 2015 14:53:55 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id 9ADAAEBA for ; Tue, 7 Apr 2015 14:53:55 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 730255A9F27; Tue, 7 Apr 2015 14:53:54 +0000 (UTC) Date: Tue, 7 Apr 2015 14:53:54 +0000 From: Brooks Davis To: Yuri Subject: Re: [BUG?] dhclient sends packets with source IP address that has been deleted Message-ID: <20150407145354.GA9746@spindle.one-eyed-alien.net> References: <55234B74.5020506@rawbw.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: <55234B74.5020506@rawbw.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 14:53:55 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 06, 2015 at 08:13:56PM -0700, Yuri wrote: > I am observing what dhclient sends to the server. Source IP of the=20 > packet it sends is the previous DHCP lease. This address doesn't exist=20 > any more, because I manually deleted it with 'ifconfig em0 remove '= =20 > command. Yet, when I rerun dhclient, it takes this address from=20 > /var/db/dhclient.leases.em0 and sends the UDP packet with this=20 > non-existent IP as source address in IP header. >=20 > This looks very weird to me, though I am not sure what the practical=20 > implications of this might be. My guess is that it is able to do this=20 > because it injects packets with bpf. > Should this thing be fixed, or this is harmless? >=20 > Some other host might have this IP address by the time dhclient runs,=20 > and this might cause confusion somewhere. I suppose that since dhclient has been killed and restarted it can't know it's on the same network, but in practice you want to try to get the same lease again and fall back if it turns out you've moved or your dhcp server is broken and lost state. I don't see how this would hurt anything. -- Brooks --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUj74EACgkQXY6L6fI4GtQQBgCfQ4mF8TiUlPEfEvRxEb1aozke D4wAmwTO3OW/4SnWleWnS6xI3BTCDJQZ =Ab4r -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v--