Is it ok to create copies of sk_buff in PRE_ROUTING hook and call okfn(sk_buff_ptr) to forward it to multiple machines ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI all,
I am working on a task which requires my netfilter based  kernel
module (hooks at PRE_ROUTING and POST_ROUTING) to send same tcp packet
to multiple machines. What i have done in my hook is  sk_buff_ptr  =
pskb_copy(pskb) ; where pskb is original packet passed to my hook
function @ PRE_ROUTING by netfilter layer. and after modifying ip
address and ports
i do okfn(sk_buff_ptr). This is working and i am getting the desired output.

    But i am not sure if this is correct way to do this kind of job ??
Or is there any other mechanism to achieve same.?? I want make sure
that the cloned packets travel the correct path in networking code and
not bypass something important.From what i have understood okfn
function will be anyway called with packet pointer passed to it
(ip_rcv_finish or similar) after the hooks . So this should not be an
issue but need confirmation/correction from netfilter community.

Thanks,
 Rohit
-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux