Bug 127313

Summary: [patch] security/knock: use less CPU
Product: Ports & Packages Reporter: Duane Wessels <wessels>
Component: Individual Port(s)Assignee: Shaun Amott <shaun>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

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

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 
  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
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"