From thomas@cuivre.fr.eu.org  Thu Aug  2 03:55:37 2001
Return-Path: <thomas@cuivre.fr.eu.org>
Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6])
	by hub.freebsd.org (Postfix) with ESMTP id 33F3B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Aug 2001 03:55:37 -0700 (PDT)
	(envelope-from thomas@cuivre.fr.eu.org)
Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34])
	by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id E4FF58318
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Aug 2001 12:55:34 +0200 (CEST)
Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000)
	id 51C8B24D45; Thu,  2 Aug 2001 12:55:33 +0200 (CEST)
Message-Id: <20010802105533.51C8B24D45@melusine.cuivre.fr.eu.org>
Date: Thu,  2 Aug 2001 12:55:33 +0200 (CEST)
From: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ipfstat picks wrong headers
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         29384
>Category:       bin
>Synopsis:       ipfstat picks wrong headers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jlemon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 02 04:00:04 PDT 2001
>Closed-Date:    Sun Sep 2 12:30:02 PDT 2001
>Last-Modified:  Mon Sep  3 09:10:00 PDT 2001
>Originator:     Thomas Quinot
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD melusine.cuivre.fr.eu.org 4.3-STABLE FreeBSD 4.3-STABLE #8: Fri Jul 6 16:46:45 CEST 2001 thomas@melusine.cuivre.fr.eu.org:/usr/obj/usr/src/sys/MELUSINE i386


	
>Description:
	ipfstat picks some ipfilter headers from /usr/include/netinet
	instead of /sys/contrib/ipfilter/netinet/. When the ipfilter
	structures are changed, this causes an inconsistence between
	the kernel ipfilter and the ipfstat binary.

>How-To-Repeat:
/usr/src/sbin/ipfstat # cc -O2 -pipe  -DIPL_NAME=\"/dev/ipl\" -DSTATETOP -I- -I/usr/src/sbin/ipfstat/../../sys/netinet -I/usr/src/sbin/ipfstat/../../sys -I/usr/src/sbin/ipfstat/../../contrib/ipfilter -E /usr/src/sbin/ipfstat/../../contrib/ipfilter/fils.c

(will pick headers from /usr/include/netinet/)

>Fix:

In src/sbin/ipfstat:

--- Makefile.dist	Thu Aug  2 12:01:13 2001
+++ Makefile	Thu Aug  2 12:50:42 2001
@@ -8,6 +8,7 @@
 CFLAGS+=-DIPL_NAME=\"/dev/ipl\" -DSTATETOP
 CFLAGS+=-I- -I${.CURDIR}/../../sys/netinet -I${.CURDIR}/../../sys
 CFLAGS+=-I${.CURDIR}/../../contrib/ipfilter
+CFLAGS+=-I${.CURDIR}/../../sys/contrib/ipfilter
 
 DPADD=	${LIBNCURSES}
 LDADD=	-lncurses
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jlemon 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Thu Aug 2 05:35:52 PDT 2001 
Responsible-Changed-Why:  
jlemon relocated ipf. 

Jonathan - this patch looks sensible to me. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29384 
State-Changed-From-To: open->closed 
State-Changed-By: jlemon 
State-Changed-When: Sun Sep 2 12:30:02 PDT 2001 
State-Changed-Why:  
Fixed in rev 1.12; thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29384 

From: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: jlemon@FreeBSD.org, freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/29384: ipfstat picks wrong headers
Date: Mon, 3 Sep 2001 18:05:22 +0200

 Le 2001-09-02, jlemon@FreeBSD.org crivait :
 
 > Fixed in rev 1.12; thanks!
 
 I'm afraid not. fils.c #includes "netinet/ip_nat.h"
 but 1.12 adds a -I for /sys/contrib/ipfilter/netinet/.
 whereas /sys/contrib/ipfilter/ would be needed.
 
 -- 
     Thomas.Quinot@Cuivre.FR.EU.ORG
>Unformatted:
