Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2019 14:54:22 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r353402 - in stable/12: share/man/man4 sys/netinet
Message-ID:  <201910101454.x9AEsMKs071511@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Oct 10 14:54:22 2019
New Revision: 353402
URL: https://svnweb.freebsd.org/changeset/base/353402

Log:
  MFC r353290:
  
  In r343587 a simple port filter as sysctl tunable was added to siftr.
  The new sysctl was not added to the siftr.4 man page at the time.
  This updates the man page, and removes one left over trailing whitespace.
  
  Submitted by:		Richard Scheffenegger
  Differential Revision:	https://reviews.freebsd.org/D21619

Modified:
  stable/12/share/man/man4/siftr.4
  stable/12/sys/netinet/siftr.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man4/siftr.4
==============================================================================
--- stable/12/share/man/man4/siftr.4	Thu Oct 10 14:52:48 2019	(r353401)
+++ stable/12/share/man/man4/siftr.4	Thu Oct 10 14:54:22 2019	(r353402)
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 18, 2015
+.Dd October 7, 2019
 .Dt SIFTR 4
 .Os
 .Sh NAME
@@ -130,6 +130,14 @@ By default, the value is set to 0, which means no hash
 The hashes are useful to correlate which TCP packet triggered the generation of
 a particular log message, but calculating them adds additional computational
 overhead into the fast path.
+.El
+.Bl -tag -offset indent -width Va
+.It Va net.inet.siftr.port_filter
+controls on which source or destination port siftr should capture
+.Nm .
+By default, the value is set to 0, which means all ports are eligible for logging.
+Set to any other value, only packets where either the source or destination
+port is equal to this number are logged.
 .El
 .Ss Log Format
 A typical

Modified: stable/12/sys/netinet/siftr.c
==============================================================================
--- stable/12/sys/netinet/siftr.c	Thu Oct 10 14:52:48 2019	(r353401)
+++ stable/12/sys/netinet/siftr.c	Thu Oct 10 14:54:22 2019	(r353402)
@@ -916,7 +916,7 @@ siftr_chkpkt(void *arg, struct mbuf **m, struct ifnet 
 	 * Only pkts selected by the tcp port filter
 	 * can be inserted into the pkt_queue
 	 */
-	if ((siftr_port_filter != 0) && 
+	if ((siftr_port_filter != 0) &&
 	    (siftr_port_filter != ntohs(inp->inp_lport)) &&
 	    (siftr_port_filter != ntohs(inp->inp_fport))) {
 		goto inp_unlock;



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