Skip to contentSkip to conversation

ip_route_me_harder question

DISCUSSION Giant Sand Fan's 2 participants 3 messages Jan 7, 2009 – Jan 12, 2009 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I have a netfilter module that needs to reroute a packet after unpacking it (minimal encap) in NF_IP_PRE_ROUTING, because the dst changes. But even when a ip_route_me_harder with RTN_LOCAL works (ret==0) the packet disappears.

The question is , do i need to use ip_route_me_harder? because when the dst of encapsulated packet is the local machine it works.

thanks.

Signature · 2 lines
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
#1 lore raw
Quoted 9 lines · Giant Sand Fan's

Hi,

I have a netfilter module that needs to reroute a packet after unpacking it (minimal encap) in NF_IP_PRE_ROUTING, because the dst changes. But even when a ip_route_me_harder with RTN_LOCAL works (ret==0) the packet disappears.

The question is , do i need to use ip_route_me_harder? because when the dst of encapsulated packet is the local machine it works.

You don't need rerouting in *PRE*ROUTING, regular routing will take care of this.

#2 lore raw

Thanks, yes, i had check the sk_buff->entry in prerouting and post and saw how it changes.

I understand that only had to call ip_route_me_harder in a hook handler after a "routing block" if you have change the ip addresses.

2009/1/12 Patrick McHardy <[email protected]>:

Quoted 15 lines
Quoted 10 lines · Giant Sand Fan's

Hi,

I have a netfilter module that needs to reroute a packet after unpacking it (minimal encap) in NF_IP_PRE_ROUTING, because the dst changes. But even when a ip_route_me_harder with RTN_LOCAL works (ret==0) the packet disappears.

The question is , do i need to use ip_route_me_harder? because when the dst of encapsulated packet is the local machine it works.

You don't need rerouting in *PRE*ROUTING, regular routing will take care of this.

Signature · 2 lines
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html