From owner-svn-src-stable@freebsd.org Sat Apr 7 19:38:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5ED4FA1B0D; Sat, 7 Apr 2018 19:38:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50EF4854D6; Sat, 7 Apr 2018 19:38:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49998251C7; Sat, 7 Apr 2018 19:38:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w37JcuS6062485; Sat, 7 Apr 2018 19:38:56 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w37Jcu6e062483; Sat, 7 Apr 2018 19:38:56 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201804071938.w37Jcu6e062483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 7 Apr 2018 19:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332209 - in stable/11: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/netpfil/ipfw X-SVN-Commit-Revision: 332209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2018 19:38:56 -0000 Author: tuexen Date: Sat Apr 7 19:38:55 2018 New Revision: 332209 URL: https://svnweb.freebsd.org/changeset/base/332209 Log: MFC r324216: Fix a bug which avoided that rules for matching port numbers for SCTP packets where actually matched. While there, make clean in the man-page that SCTP port numbers are supported in rules. Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sat Apr 7 19:29:19 2018 (r332208) +++ stable/11/sbin/ipfw/ipfw.8 Sat Apr 7 19:38:55 2018 (r332209) @@ -537,7 +537,7 @@ for filtering packets, among the following: .It Layer-2 header fields When available .It IPv4 and IPv6 Protocol -TCP, UDP, ICMP, etc. +SCTP, TCP, UDP, ICMP, etc. .It Source and dest. addresses and ports .It Direction See Section @@ -1396,7 +1396,7 @@ error-prone. No support for sets of IPv6 addresses is provided because IPv6 addresses are typically random past the initial prefix. .It Ar ports : Bro Ar port | port Ns \&- Ns Ar port Ns Brc Ns Op , Ns Ar ports -For protocols which support port numbers (such as TCP and UDP), optional +For protocols which support port numbers (such as SCTP, TCP and UDP), optional .Cm ports may be specified as one or more ports or port ranges, separated by commas but no spaces, and an optional Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Sat Apr 7 19:29:19 2018 (r332208) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Sat Apr 7 19:38:55 2018 (r332209) @@ -1847,7 +1847,8 @@ do { \ */ if ((proto == IPPROTO_UDP || proto == IPPROTO_UDPLITE || - proto == IPPROTO_TCP) && offset == 0) { + proto == IPPROTO_TCP || + proto==IPPROTO_SCTP) && offset == 0) { u_int16_t x = (cmd->opcode == O_IP_SRCPORT) ? src_port : dst_port ;