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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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> |