udhcpc: dont use BPF filter, users report problems (bugs 4598, 6746), commit e4785ca653d0e219926692c229673b2c1b8d6ac4

Denys Vlasenko vda.linux at googlemail.com
Thu Feb 6 16:20:42 UTC 2014


On Wed, Feb 5, 2014 at 9:51 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Wednesday, February 05, 2014 16:41:15 Cristian Ionescu-Idbohrn wrote:
>> On Wed, 5 Feb 2014, Denys Vlasenko wrote:
>> > On Tue, Feb 4, 2014 at 8:48 PM, Cristian Ionescu-Idbohrn
> <cristian.ionescu-idbohrn at axis.com> wrote:
>> > > The backside of this, IIRC, is that udhcpc will eat up huge chunks of
>> > > CPU parsing "uninteresting" packets, on "heavy" loaded networks.
>> >
>> > udhcpc does not listen to the network after it established a lease.
>>
>> As I said, it's not the wait to get a lease that is a problem but the
>> high CPU load (parsing packets).
>
> what is using the high CPU load ?  not udhcpc, but the kernel itself ?
>
> what kernel are you using exactly ?  what arch ?

udhcpc uses raw socket to receive *all IPv4 packets* when it waits
for initial DHCP server responses. Therefore, it can get potentially
lots and lots of unrelated packets, and needs to check and
discard each of them.

I am not convinced this is a problem in practice.

I want to avoid fixing a non-existing problem. We "fixed" it once
with BPF filter, creating a real problem: for some people,
presence of that filter broke udhcpc. (For me it worked).


More information about the busybox mailing list