OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » networking » discuss

Thread: Packet FIltering Hooks code review.

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Last Post: Aug 17, 2006 1:08 AM by: darrenr
darrenr

Posts: 2,060
From:

Registered: 6/8/05
Packet FIltering Hooks code review.
Posted: Jul 19, 2006 6:17 AM

  Click to reply to this thread Reply

Code review for PSARC/2005/334 - Packet Filtering Hooks - is now open.

You can find the code review files at:

http://cr.grommit.com/~darrenr/pfhooks-2006-7-19/review/
http://cr.grommit.com/~darrenr/pfhooks-2006-7-19/webrev/

For those on SWAN, the gate itself can be found at:
/net/greatwall.prc/workspaces/pfh-gate-prc

The parent gate/snapshot is onnv43 - our locally trimmed
down version (minus the result of "make install") is:
/net/ephron.prc/export/onnv43

Feedback on the changes by the 4th of August, 2006, would be
appreciated.

Note that there are some unresolved issues with respect to the
use of b_prev that have bitten us a few times with this project,
for which we've developed workarounds that could be considered
"hacks". In the fullness of time OpenSolaris needs to stop
using b_prev for storing the ifindex and at which point those
hacks can be removed. Where appropriate, those changes cite the
relevant bugs with comments next to the code.

There are a number of bugs that this project will enable to be
closed through the change of architecture from pfil/pfild to
pfhooks. I haven't listed these bugs with this webrev as it
isn't clear to me that this makes sense.

The IPFilter upgrade and surya project will both require further
changes and testing of this gate once they have completed putback
into ON.

The manual pages included with this code review are /not/ what
will be distributed in the final product shipped, rather they
are what the documentation team will use as input into the final
product. All man pages in the gate are in nroff format. If it
will help, I will look at generating text or html pages for
review - but bear in mind, the changes accepted/made may not
be used.

Currently the only kernel memory leak we've stumbled across is
documented in 6448003. Otherwise all of our test suites indicate
success.

Darren

_______________________________________________
networking-discuss mailing list
networking-discuss at opensolaris dot org



ianbrn

Posts: 34
From:

Registered: 1/29/06
Re: Packet FIltering Hooks code review.
Posted: Aug 15, 2006 5:44 AM   in response to: darrenr

  Click to reply to this thread Reply

Hello,
I am trying to apply the patch
in http://cr.grommit.com/~darrenr/pfhooks-2006-7-19/review/diffs-u.txt

for onnv_43.

I try
gpatch < ../d

carlsonj

Posts: 6,810
From: US

Registered: 3/9/05
Re: Re: Packet FIltering Hooks code review.
Posted: Aug 15, 2006 5:55 AM   in response to: ianbrn

  Click to reply to this thread Reply

Ian Brown writes:
> I try
> gpatch < ../d
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
networking-discuss at opensolaris dot org



ianbrn

Posts: 34
From:

Registered: 1/29/06
Re: Re: Packet FIltering Hooks code review.
Posted: Aug 15, 2006 8:45 AM   in response to: carlsonj

  Click to reply to this thread Reply

Thanks;
I did the following test now , after probing a bit; I DON'T get errors now, but something
is strange and I have a question I hope someone can answer.

I unzipped onnv43 to usr
I had changed the lines in the diff-u.txt which included the source files path in this way:

It was:
Index: usr/src/cmd/devfsadm/misc_link.c
*** /net/ephron.prc/export/onnv43/usr/src/cmd/devfsadm/misc_link.c

and now it is , instead ,
*** usr/src/cmd/devfsadm/misc_link.c

I did it to all files under *** /net//ephron.prc/export/onnv43/usr/
now I cd to usr (the onnv43 unzipp created it)

And I ran :
gpatch -p1 < ../d

darrenr

Posts: 2,060
From:

Registered: 6/8/05
Re: Re: Re: Packet FIltering Hooks code review.
Posted: Aug 17, 2006 1:08 AM   in response to: ianbrn

  Click to reply to this thread Reply

Ian Brown wrote:

>Thanks;
>I did the following test now , after probing a bit; I DON'T get errors now, but something
>is strange and I have a question I hope someone can answer.
>
>I unzipped onnv43 to usr
>I had changed the lines in the diff-u.txt which included the source files path in this way:
>
>It was:
>Index: usr/src/cmd/devfsadm/misc_link.c
>*** /net/ephron.prc/export/onnv43/usr/src/cmd/devfsadm/misc_link.c
>
>and now it is , instead ,
>*** usr/src/cmd/devfsadm/misc_link.c
>
>I did it to all files under *** /net//ephron.prc/export/onnv43/usr/
>now I cd to usr (the onnv43 unzipp created it)
>
>And I ran :
>gpatch -p1 < ../dIt doesn'y generate errors (complete full log is down next)
>
>
>what is strange to me is that it creates a folder named workspaces under usr and pfh-gate-prc folder below it.
>so in fact I have for example : /usr/workspaces/pfh-gate-prc/usr/src/uts/common/io/hook.c
>/usr/workspaces/pfh-gate-prc/usr/src/uts/common/io/hook.conf
>/usr/workspaces/pfh-gate-prc/usr/src/uts/common/io/neti.c
>(there are some more files generated under /usr/workspaces/pfh-gate-prc/usr/...)
>
>I looked a bit at the diif-u.txt file and I see that , in the case of neti.c,
>the corrseponding lines are:
>
>*** /dev/null Wed Jul 19 20:39:38 2006
>--- /workspaces/pfh-gate-prc/usr/src/uts/common/io/neti.c Thu Jul 6 15:14***************
>
>
>As I understand this line is because neti.c does not exist in current unpatched version of
>onnv43. (and this is the reason for /dev/null ).
>So my question is : what am I doing wrong ? I suppose that workspaces should not be
>created and neti.c should be created under usr/src/uts/common/io.
>Is there some switch I should add to the gpatch command to avoid creating files
>under /usr/workspaces/pfh-gate-prc/usr/...?
>
>...
>patching file workspaces/pfh-gate-prc/usr/src/cmd/mdb/common/modules/hook/hook.cpatching file workspaces/pfh-gate-prc/usr/src/cmd/mdb/common/modules/neti/neti.cpatching file workspaces/pfh-gate-prc/usr/src/cmd/mdb/intel/amd64/hook/Makefile
>patching file workspaces/pfh-gate-prc/usr/src/cmd/mdb/intel/amd64/neti/Makefile
>
...

I think the thing to do, since you have started doing some editting
of the text patch file, is to keep with it and delete the text
"/workspaces/pfh-gate-prc/" from each line where it occurs.

But at this point, I think it would be better for you to do this:
# cd /usr/workspaces/pfh-gate-prc/usr/src
# pax -r -w -pe . /path-to-onnv43/usr/src
(you might want to verify that pax has copied all of the new source
files before going the next step to delete all of this.)

# cd /usr
# rm -rf workspaces

Darren

_______________________________________________
networking-discuss mailing list
networking-discuss at opensolaris dot org






Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.