<div dir="ltr">Well, what made me think about such an idea is the following.<br><br>I am doing several operations on each SKB and after confirming several tests (in a kinda nested manner) I realize that a packet needs<div>
to be stolen.</div><div><br></div><div>The trouble is that I am doing in this in a long series of function calls so it would had looked ugly to propagate all my test results up to the hook function I have so I can know whether to return NF_ACCEPT or NF_STOLEN</div>
<div><br>Anyhow, I've already made the needed changes to reflect my 'tests' to the hook function so when they're all met, I return NF_STOLEN but was looking for something less messy.</div><div><br></div><div>
Regards,<br>Adel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 3, 2013 at 10:16 AM, Rami Rosen <span dir="ltr"><<a href="mailto:roszenrami@gmail.com" target="_blank">roszenrami@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Adel,<br>
<br>
The NF_STOLEN return code is not assigned to any sk_buff field as you know.<br>
<br>
What would it give you if you could mark somehow the sk_buff with<br>
NF_STOLEN? what do you want to achieve with it ? what is wrong with<br>
how things are now- first calling the other hooks and then the NF_STOLEN?<br>
<br>
Best,<br>
Rami Rosen<br>
<a href="http://ramirose.wix.com/ramirosen" target="_blank">http://ramirose.wix.com/ramirosen</a><br>
<div><div class="h5"><br>
On Tue, Jul 2, 2013 at 8:30 PM, Adel Qodmani <<a href="mailto:mpcadel@gmail.com">mpcadel@gmail.com</a>> wrote:<br>
> Hello everyone,<br>
><br>
> In any Netfilter hook, we return NF_STOLEN to mark that we're handling the<br>
> packet and we'd be responsible for its fate.<br>
><br>
> My question is, my hook calls several functions on the SKB before knowing if<br>
> I want to steal it or not so is there a way to just mark the SKB itself as<br>
> stolen instead of using the hook NF_STOLEN return code?<br>
><br>
> Thanks,<br>
> Adel<br>
><br>
</div></div>> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
</blockquote></div><br></div>