I've implemented dual wan with failover with a Linksys WRT54GL, using DD-WRT, exactly as explained here
http://www.dd-wrt.com/wiki/index.php/Dual_WAN_with_failover
When wan1 fails and the device switches to wan2, outbound connections are fine, but inbound connections (ping, nat) don't work.