pf build errors

Mark Cullen mark.cullen at dsl.pipex.com
Sat Oct 23 04:29:23 PDT 2004


While building a kernel with device pf and device pflog I noticed an error:

/usr/src/sys/net/pf/if_pflog.c: In function `pflog_clone_create':
/usr/src/sys/net/pf/if_pflog.c:131: `IFT_PFLOG' undeclared (first use in 
this function)
/usr/src/sys/net/pf/if_pflog.c:131: (Each undeclared identifier is 
reported only once
/usr/src/sys/net/pf/if_pflog.c:131: for each function it appears in.)

I did a quick search for IFT_PFLOG and it came up with #define IFT_PFLOG 
0xf5 in net/if_types.h

-- the google result--
$OpenBSD: if_types.h,v 1.15 2003/06/02 23:28:12 millert Exp ...
. .. IFT_GIF 0xf0 #define IFT_DUMMY 0xf1 #define IFT_PVC 0xf2 #define 
IFT_FAITH 0xf3
#define IFT_ENC 0xf4 /* Encapsulation */ #define IFT_PFLOG 0xf5 /* 
Packet ...
pluto.cdpa.nsysu.edu.tw/OpenBSD/src/sys/net/if_types.h - 15k - Cached - 
Similar pages
------------------------

Should that be added to DF's if_types.h too? Like uhm..

--- if_types.h.orig  2003-06-17 04:28:48.000000000 +0000
+++ if_types.h      2004-10-23 11:11:37.000000000 +0000
@@ -249,4 +249,5 @@
 #define        IFT_PVC         0xf1
 #define        IFT_FAITH       0xf2
 #define        IFT_STF         0xf3
+#define	IFT_PFLOG	0xf5
 #endif /* !_NET_IF_TYPES_H_ */
But there's also:

cc -c -O -pipe -march=pentiumpro -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi 
-DKLD_MODULE -nostdinc -I. -I@ -I@/../include -g 
-mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi 
/usr/src/sys/emulation/linux/../../emulation/linux/i386/linux_genassym.c
/usr/src/sys/net/pf/pf.c: In function `pf_send_tcp':
/usr/src/sys/net/pf/pf.c:1308: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:1308: `PF_MBUF_GENERATED' undeclared (first use 
in this function)
/usr/src/sys/net/pf/pf.c:1308: (Each undeclared identifier is reported 
only once
/usr/src/sys/net/pf/pf.c:1308: for each function it appears in.)
/usr/src/sys/net/pf/pf.c: In function `pf_send_icmp':
/usr/src/sys/net/pf/pf.c:1416: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:1416: `PF_MBUF_GENERATED' undeclared (first use 
in this function)
sh @/kern/genassym.sh linux_genassym.o > linux_assym.h
/usr/src/sys/net/pf/pf.c: In function `pf_match_tag':
/usr/src/sys/net/pf/pf.c:1552: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:1552: `PF_MBUF_TAGGED' undeclared (first use in 
this function)
/usr/src/sys/net/pf/pf.c:1553: structure has no member named `pf_tag'
cc -c -x assembler-with-cpp -DLOCORE -O -pipe -march=pentiumpro 
-D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual 
-fformat-extensions -ansi -DKLD_MODULE -nostdinc  -I. -I@ -I@/../include 
-g -mpreferred-stack-boundary=2 -fno-common -ffreestanding -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual 
-fformat-extensions -ansi 
/usr/src/sys/emulation/linux/../../emulation/linux/i386/linux_locore.s 
-o linux_locore.o
/usr/src/sys/net/pf/pf.c: In function `pf_tag_packet':
/usr/src/sys/net/pf/pf.c:1568: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:1568: `PF_MBUF_TAGGED' undeclared (first use in 
this function)
/usr/src/sys/net/pf/pf.c:1569: structure has no member named `pf_tag'

[snip]

cc -O -pipe -march=pentiumpro  -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi 
-DKLD_MODULE -nostdinc  -I. -I@ -I@/../include -g 
-mpreferred-stack-boundary=2 -fno-common -ffreestanding -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual 
-fformat-extensions -ansi -c 
/usr/src/sys/emulation/svr4/../../emulation/svr4/i386/svr4_machdep.c
/usr/src/sys/net/pf/pf.c: In function `pf_route':
/usr/src/sys/net/pf/pf.c:4887: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:4887: `PF_MBUF_ROUTED' undeclared (first use in 
this function)
/usr/src/sys/net/pf/pf.c:4888: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:4889: structure has no member named `pf_routed'
/usr/src/sys/net/pf/pf.c:4891: structure has no member named `pf_routed'
/usr/src/sys/net/pf/pf.c:4896: structure has no member named `pf_routed'
/usr/src/sys/net/pf/pf.c: In function `pf_route6':
/usr/src/sys/net/pf/pf.c:5057: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:5057: `PF_MBUF_ROUTED' undeclared (first use in 
this function)
/usr/src/sys/net/pf/pf.c:5058: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:5059: structure has no member named `pf_routed'
/usr/src/sys/net/pf/pf.c:5061: structure has no member named `pf_routed'
/usr/src/sys/net/pf/pf.c:5066: structure has no member named `pf_routed'
/usr/src/sys/net/pf/pf.c:5091: structure has no member named `pf_flags'
cc -O -pipe -march=pentiumpro  -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi 
-DKLD_MODULE -nostdinc  -I. -I@ -I@/../include -g 
-mpreferred-stack-boundary=2 -fno-common -ffreestanding -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual 
-fformat-extensions -ansi -c /usr/src/sys/emulation/svr4/svr4_resource.c
/usr/src/sys/net/pf/pf.c:5091: `PF_MBUF_GENERATED' undeclared (first use 
in this function)
/usr/src/sys/net/pf/pf.c: In function `pf_check_proto_cksum':
/usr/src/sys/net/pf/pf.c:5221: too many arguments to function 
`in_cksum_range'
/usr/src/sys/net/pf/pf.c:5260: `icmpstat' undeclared (first use in this 
function)
/usr/src/sys/net/pf/pf.c: In function `pf_test':
/usr/src/sys/net/pf/pf.c:5287: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:5287: `PF_MBUF_GENERATED' undeclared (first use 
in this function)
/usr/src/sys/net/pf/pf.c:5497: structure has no member named `pf_flags'
/usr/src/sys/net/pf/pf.c:5497: `PF_MBUF_TRANSLATE_LOCALHOST' undeclared 
(first use in this function)

Uh, I'll stop there. Basically I think its broken! Or did I do something 
a little wrong?

Here's the end of my kernel config, where I generally add options myself:

options IPFIREWALL
options IPDIVERT
options IPSTEALTH
options RANDOM_IP_ID
options DEVICE_POLLING
options HZ=1000
options DUMMYNET
#options IPFW2
device pf
device pflog
Other than that I've just removed usb, scsi, raid and any networking 
devices I didn't need (just got device miibus and device fxp actually)
--
Internet Explorer? Try FireFox at http://www.mozilla.org/products/firefox/
Outlook Express? Try ThunderBird at 
http://www.mozilla.org/products/thunderbird/





More information about the Kernel mailing list