Skip to contentSkip to conversation

stealing packets

DISCUSSION Zeeshan Ali 2 participants 3 messages Nov 23, 2003 – Nov 24, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hello everyone,
First of all, i would be very glad if someone
answers my last question on this mailing list. I am still worried about that. Now here is my next
question: Is it possible that after stealing a packet inside any of the hooks, i can put the packet back again (without creating an infinite loop) sometime later.

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

#1 lore raw
Quoted 4 lines · Zeeshan Ali

still worried about that. Now here is my next
question: Is it possible that after stealing a packet inside any of the hooks, i can put the packet back again (without creating an infinite loop) sometime later.

If the hook returns NF_QUEUE then the packet will be sent to the netfilter queue handler from where it can later be reinjected and will then continue on the next hook.

Regards
Henrik

#2 lore raw

Hello,
Thanks for responding.

Quoted 5 lines

If the hook returns NF_QUEUE then the packet will be sent to the netfilter
queue handler from where it can later be reinjected and will then continue
on the next hook.

Yeah, i know that but the kernel does'nt like it
when you re-inject the packet sometimes later. E.g this simple test code inside the queue handler function caused a kernel panic:

  static struct sk_buff *next = NULL;
 
  if (next != NULL) {
    nf_reinject (next, info, NF_ACCEPT);
  }

  next = skb;

return 0; /* what should be the return value? */

    BTW, my first question still remains unanswered :(

Anyway, I 've just re-compiled the kernel with a lot of debuging into the routing code, so i gues that would help to identify my problem. Anyway, thanks for replying. Bye.

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree