Bug 127313 - [patch] security/knock: use less CPU
Summary: [patch] security/knock: use less CPU
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Shaun Amott
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-12 07:40 UTC by Duane Wessels
Modified: 2008-11-14 16:40 UTC (History)
0 users

See Also:


Attachments
file.diff (361 bytes, patch)
2008-09-12 07:40 UTC, Duane Wessels
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duane Wessels 2008-09-12 07:40:00 UTC
knockd uses too much CPU, especially on systems with slower or low-power
CPUS (such as the Soekris net4501).

The timeout argument to pcap_open_live (1 ms) seems unreasonably small.  On a
soekris box it uses 15% of CPU.  Setting the timeout to 1 second reduces it to
"0.00%".

Fix: Patch attached with submission follows:
How-To-Repeat: Install and configure on a system with ~133 MHz CPU.  Check process CPU
usage with 'top'.
Comment 1 Edwin Groothuis freebsd_committer 2008-09-12 10:03:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->shaun

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Shaun Amott freebsd_committer 2008-11-14 16:25:40 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer 2008-11-14 16:37:09 UTC
shaun       2008-11-14 16:36:55 UTC

  FreeBSD ports repository

  Modified files:
    security/knock       Makefile 
  Added files:
    security/knock/files patch-src-knockd.c 
  Log:
  Increase pcap read timeout to reduce gratuitous CPU burden.
  
  PR:             ports/127313
  Submitted by:   Duane Wessels <wessels@life-gone-hazy.com>
  
  Revision  Changes    Path
  1.4       +1 -0      ports/security/knock/Makefile
  1.1       +11 -0     ports/security/knock/files/patch-src-knockd.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"