From owner-freebsd-bugs Mon Jan 19 06:40:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA02206 for freebsd-bugs-outgoing; Mon, 19 Jan 1998 06:40:10 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA02191; Mon, 19 Jan 1998 06:40:03 -0800 (PST) (envelope-from gnats) Received: from hardrock.sdsmt.edu (hardrock.sdsmt.edu [151.159.9.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA02107 for ; Mon, 19 Jan 1998 06:39:39 -0800 (PST) (envelope-from sbauer@hardrock.sdsmt.edu) Received: (from sbauer@localhost) by hardrock.sdsmt.edu (8.8.8/8.8.8) id HAA02099; Mon, 19 Jan 1998 07:39:35 -0700 (MST) (envelope-from sbauer) Message-Id: <199801191439.HAA02099@hardrock.sdsmt.edu> Date: Mon, 19 Jan 1998 07:39:35 -0700 (MST) From: Steve Bauer Reply-To: sbauer@hardrock.sdsmt.edu To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/5522: ip_input.c & ip_output.c problems when trying to use ipfilter Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 5522 >Category: kern >Synopsis: ip_input.c & ip_output.c problems when trying to use ipfilter >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 19 06:40:01 PST 1998 >Last-Modified: >Originator: Steve Bauer >Organization: South Dakota School of Mines and Technology >Release: FreeBSD 3.0-CURRENT i386 >Environment: The environment is FreeBSD 3.0-CURRENT that was cvsup'd at 7:15AM MST (14:15 GMT). machine: Gateway NS 7000 Num cpus: 2 cpu type: Pentium II 300 ram: 64MB Netcard: Adaptec Cogent Quartet ANA-6944/TX HD Interface: Adaptec Fast & Wide SCSI built on to motherboard (aic7880) HD: IBM DCAS-34330W 4.1 GB Video: Cirrus Logic GD5430 >Description: The problem is that when the options IPFILTER_LKM and IPFILTER_LOG as specified in the kernel config file and the resulting kernel built. One gets the following error message: ip_input.o: undefined symbol fr_check After examining the problem with ip_input.c, I also check the other places that IPFILTER was defined and have found a couple more errors. >How-To-Repeat: Try to build the kernel with the following options: options IPFILTER_LKM options IPFILTER_LOG >Fix: Below are the fixes to ip_input.c and ip.output.c *** ip_input.c.orig Mon Jan 19 07:19:35 1998 --- ip_input.c Mon Jan 19 07:19:58 1998 *************** *** 147,153 **** #endif #if defined(IPFILTER_LKM) || defined(IPFILTER) - int fr_check __P((struct ip *, int, struct ifnet *, int, struct mbuf **)); int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **)) = NULL; #endif --- 147,152 ---- *************** *** 341,347 **** * Check if we want to allow this packet to be processed. * Consider it to be bad if not. */ ! if (fr_check) { struct mbuf *m1 = m; if ((*fr_checkp)(ip, hlen, m->m_pkthdr.rcvif, 0, &m1) || !m1) --- 340,346 ---- * Check if we want to allow this packet to be processed. * Consider it to be bad if not. */ ! if (fr_checkp) { struct mbuf *m1 = m; if ((*fr_checkp)(ip, hlen, m->m_pkthdr.rcvif, 0, &m1) || !m1) *** ip_output.c.orig Mon Jan 19 07:16:08 1998 --- ip_output.c Mon Jan 19 07:16:36 1998 *************** *** 83,89 **** #if defined(IPFILTER_LKM) || defined(IPFILTER) int ip_optcopy __P((struct ip *, struct ip *)); - extern int fr_check __P((struct ip *, int, struct ifnet *, int, struct mbuf **)); extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **)); #else static int ip_optcopy __P((struct ip *, struct ip *)); --- 83,88 ---- >Audit-Trail: >Unformatted: