Re: Updating the dead-gateway detection patch...

From: Philip A. Prindeville
Date: Sat Dec 13 2008 - 16:23:35 EST


Brian Haley wrote:
Philip A. Prindeville wrote:
Brian Haley wrote:
Philip A. Prindevill wrote:
+ #ifdef CONFIG_NET_NS
+ if (fib_lookup(dev->nd_net, &fl, &res) != 0)
+ #else
+ if (fib_lookup(&init_net, &fl, &res) != 0)
+ #endif

Yuck. You should use dev_net(dev), it's an inline in linux/netdevice.h. Cscope is your friend :)

-Brian


Thanks for the heads-up. Amended and appended. :-)

Now, does it work right? My test machine is single-homed, so I don't have an easy way to test it.

I would hope you could tell if it's working correctly, I don't have time to test it for you. You should better describe the problem you're fixing and send this to netdev@xxxxxxxxxxxxxxx - that's where all the developers hang out.

I did notice you still had this #ifdef:

+ #ifdef CONFIG_NET_NS
+ if (ip_route_output_key(out->nd_net, &rt, &fl) != 0) {
+ #else
+ if (ip_route_output_key(&init_net, &rt, &fl) != 0) {
+ #endif

You'll want to fix that too.

-Brian

Actually, I had fixed that... I think I just sent out the wrong version of the patch...

I'd tell you more about the purpose of the patch if I had written it. I didn't. I just updated the original patch to make it compiler for 2.6.26.8 from 2.6.25.19.

My understanding is that you can have multiple default gateways, with different metrics, and rather than doing multipathing, it will ARP each gateway periodically.

The one with the lowest route metric that is responding is the one that will get your traffic.

Sort of the opposite of IP_ROUTE_MULTIPATH...

-Philip
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html