Unix Technical Forum

Missing #include "pf.h", stale code?

This is a discussion on Missing #include "pf.h", stale code? within the mailing.openbsd.tech forums, part of the OpenBSD category; --> I am trying to figure out the inner workings of PF and stumbled over what seems to be dead ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:26 AM
Daniel Roethlisberger
 
Posts: n/a
Default Missing #include "pf.h", stale code?

I am trying to figure out the inner workings of PF and stumbled over
what seems to be dead code. netinet/ip_icmp.c contains snippets guarded
by NPF > 0, most notably this one (lines 256-263):

#if NPF > 0
/* move PF_GENERATED to new packet, if existant XXX preserve more? */
if ((mtag = pf_find_mtag(n)) != NULL &&
mtag->flags & PF_TAG_GENERATED) {
mtag = pf_get_tag(m);
mtag->flags |= PF_TAG_GENERATED;
}
#endif

The above code in ip_icmp.c is not being built. It would not compile
anyway, since pf_get_tag() has been renamed to pf_get_mtag() some time
ago.

Now, why ain't that code being built? I think it is because #include
"pf.h" is missing, but my knowledge about the OpenBSD build system is
not so extensive. I also noticed that the following source files use
NPF but do not include "pf.h", but all others using NPF do:

net/if_ethersubr.c
net/if_fddisubr.c
net/if_tokensubr.c
netinet/ip_icmp.c
netinet/tcp_input.c
netinet/udp_usrreq.c

Did I miss something? As far as I can see, all these should #include
"pf.h", right?

-Dan

--
Daniel Roethlisberger <daniel@roe.ch>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com