Skip to contentSkip to conversation

ip_route_me_harder question...

DISCUSSION Pablo Cingolani 3 participants 3 messages Nov 26, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Refered to a question posted by "Zeeshan Ali <[email protected]>" a couple of days ago, I've suggested him to use ip_route_me_harder after changing a packet's saddr/daddr (at NF_IP_PRE_ROUTING).
I've noticed that it doesn't work because after the hook changes the packet, ip_rcv_finish() calls
skb->dst->input(skb) which seems to setted to something like 'dst_discard' (instead of 'ip_forward()' which is
what I was expecting).
Can someone give me a hint on what is wrong / what should be done to (correctly) change the routes so that the packet is forwarded?
Thank you
Pablo

P.S.: Packet's saddr is changed to a local one.

#1 lore raw

This is a good question. I've noticed that sometimes it's needed and sometimes it isn't. We implemented a routing protocol where all the packets were bumped up to userspace and after fiddling with the routing system for a long time, we ended up using some code from iproute2 to change the table before reinjecting the packet (unmodified). This alleviated our route_me_harder() issues. But another protocol we were looking at during our implementation used route_me_harder() and it seemed to work fine. Very confusing.

Regards,
Jon Webb
Computer Communications Research Group
University of California at Santa Cruz

Quoted 12 lines · Pablo Cingolani

Refered to a question posted by "Zeeshan Ali <[email protected]>" a couple of days ago, I've suggested him to
use ip_route_me_harder after changing a packet's saddr/daddr (at NF_IP_PRE_ROUTING).
I've noticed that it doesn't work because after the hook changes the packet, ip_rcv_finish() calls skb->dst->input(skb) which seems to setted to something like 'dst_discard' (instead of 'ip_forward()' which is
what I was expecting).
Can someone give me a hint on what is wrong / what should be done to (correctly) change the routes so that the packet is forwarded? Thank you
Pablo

P.S.: Packet's saddr is changed to a local one.

#2 lore raw

Hello,
I thought your reply implicitly suggested to try
route_me_hard () instead of ip_route_me_hard (), so i gave it a try. The compiler is happy but not the kernel. Most probably because the route_me_hard () is not accessible to all? Bye.

Quoted 16 lines · --- Jon

This is a good question. I've noticed that sometimes it's needed and
sometimes it isn't. We implemented a routing protocol where all the
packets were bumped up to userspace and after fiddling with the routing
system for a long time, we ended up using some code from iproute2 to
change the table before reinjecting the packet (unmodified). This
alleviated our route_me_harder() issues. But another protocol we were
looking at during our implementation used route_me_harder() and it
seemed to work fine. Very confusing.

Quoted 4 lines

Regards,
Jon Webb
Computer Communications Research Group University of California at Santa Cruz

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