David Young
2006-12-04 16:51:28 UTC
Module Name: src
Committed By: dyoung
Date: Mon Dec 4 02:58:06 UTC 2006
src/sys/dist/pf/net: pf.c pfvar.h
Lightly constify. Helps compile-time checking that we are not
scribbling over shared or read-only memory---e.g., in mbufs.
Why?Committed By: dyoung
Date: Mon Dec 4 02:58:06 UTC 2006
src/sys/dist/pf/net: pf.c pfvar.h
Lightly constify. Helps compile-time checking that we are not
scribbling over shared or read-only memory---e.g., in mbufs.
arguments const made it easier to winnow code paths from consideration:
if a pointer to mbuf storage was passed as const *, I knew it would not
be overwritten deliberately.
mbufs passed to pf are guaranteed to be writable. (see PR 26433)
I did not think that the fix in 26433 was intended as anything buta stopgap. It does not seem efficient to copy IP+(UDP|TCP) headers on
every single packet regardless of whether it will be modified. A better
fix would use your safe mbuf macros throughout pf. (What is the status
of that, anyway?)
I am afraid that such changes will make merging new versions of pf more
difficult. (Have you cousulted with Peter Postma?)
I did not consult with Peter. I think that this will make mergingdifficult. (Have you cousulted with Peter Postma?)
negligibly more difficult.
Dave
--
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de