Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Apr 2015 14:53:54 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Yuri <yuri@rawbw.com>
Cc:        net@freebsd.org
Subject:   Re: [BUG?] dhclient sends packets with source IP address that has been deleted
Message-ID:  <20150407145354.GA9746@spindle.one-eyed-alien.net>
In-Reply-To: <55234B74.5020506@rawbw.com>
References:  <55234B74.5020506@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <IP>'=
=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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150407145354.GA9746>