Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 1998 07:39:35 -0700 (MST)
From:      Steve Bauer <sbauer@hardrock.sdsmt.edu>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/5522: ip_input.c & ip_output.c problems when trying to use ipfilter
Message-ID:  <199801191439.HAA02099@hardrock.sdsmt.edu>

next in thread | raw e-mail | index | archive | help

>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:



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