Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2024 19:16:37 GMT
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: becd0079c052 - main - ng_ipfw(4): add missing change after previous commit
Message-ID:  <202409121916.48CJGbUl030900@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by eugen:

URL: https://cgit.FreeBSD.org/src/commit/?id=becd0079c052cb87e7649b78733b99abae8861ee

commit becd0079c052cb87e7649b78733b99abae8861ee
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2024-09-12 19:09:28 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2024-09-12 19:09:28 +0000

    ng_ipfw(4): add missing change after previous commit
    
    The function ng_ipfw_input() used to enjoy implicit
    32->16 bits truncation of its second argument.
    Make it explicit to recover from the breakage.
    
    PR:             281082
    Reported by:    Ruben van Staveren <ruben@verweg.com>
    Tested by:      Ruben van Staveren <ruben@verweg.com>
    MFC after:      3 days
    Fixes:          20e1f207cc789a28783344614d6d1d1c639c5797
---
 sys/netgraph/ng_ipfw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c
index 01592a4bbb7d..9a6bb90412fa 100644
--- a/sys/netgraph/ng_ipfw.c
+++ b/sys/netgraph/ng_ipfw.c
@@ -291,7 +291,7 @@ ng_ipfw_input(struct mbuf **m0, struct ip_fw_args *fwa, bool tee)
 	 * Node must be loaded and corresponding hook must be present.
 	 */
 	if (fw_node == NULL || 
-	   (hook = ng_ipfw_findhook1(fw_node, fwa->rule.info)) == NULL)
+	   (hook = ng_ipfw_findhook1(fw_node, fwa->rule.info & IPFW_INFO_MASK)) == NULL)
 		return (ESRCH);		/* no hook associated with this rule */
 
 	/*



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