Share

The libpcap project

Tracker: Patches

5 Fix 100% cpu usage when interface down. - ID: 2863204
Last Update: Settings changed ( guy_harris )

On some systems (distros, for example Archlinux, same messages I saw in
Ubuntu) there's problem with programs that uses libpcap. When interface
goes down it causes cpu usage to 100%. In libpcap there is no exception
statement about poll bitmasks when it return positive value. According to
'man poll' there is POLLHUP POLLNVAL and POLLERR which can be checked, also
in <bits/poll.h> there is POLLRDHUP defined for GNU systems. This patch
solves this problem.


N.Leiten ( nleiten ) - 2009-09-21 04:05

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comment ( 1 )

Date: 2009-10-13 00:22
Sender: guy_harrisProject Admin

I've checked in a variant of those changes (this isn't a per-distribution
issue, BTW).


Attached File ( 1 )

Filename Description Download
libpcap_poll_reventcheck.patch in pcap-linux.c revent bitmask check when poll returns ret>0. Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2009-10-13 00:23 guy_harris
resolution_id None 2009-10-13 00:23 guy_harris
close_date - 2009-10-13 00:23 guy_harris
summary Fix 100% cpu usage whe interface down. 2009-09-21 06:15 nleiten
summary pcap-linux poll rtevent check 2009-09-21 06:15 nleiten
File Added 343731: libpcap_poll_reventcheck.patch 2009-09-21 04:05 nleiten