Re: NF_IP_POST_ROUTING hook question (2.4)

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

 



Hi,

frankly, I'm also surprised that the 'net_device *in' is NULL.

Probably there is much simpler way to do that than my idea, but have you tried to mark somehow those packets in NF_IP_FORWARD and in NF_IP_POST_ROUTING matching only those packets?

Another think... why do you want to match forwarded packets in NF_IP_POST_ROUTING? I don't see the point, but presume that you know what you are doing...

 ---
 Jozef Hamar

 _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _
  `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´

 I must not fear. Fear is the mind-killer. Fear is the little-death that
 brings total obliteration. I will face my fear. I will permit it to pass
 over me and through me. And when it has gone past I will turn the inner
 eye to see its path. Where the fear has gone there will be nothing.
 Only  I will remain.


Quoting Yakov Lerner <iler.ml@xxxxxxxxx>:

In the NF_IP_POST_ROUTING hook function, how can I
tell that packet originated locally vs was forwarded ?
I need to hook NF_IP_POST_ROUTING not NF_IP_FORWARD.

I'd expect that 'net_device *in' argument to be  not NULL for
forwarded packets.

But what I see is NULL for both forwarded  and locally sent packets
(in NF_IP_POST_ROUTING hook).
Which field of skb can  tell me that packet originated locally ?

Yakov
-
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




-
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