From 46f998d055ee8247847b4043d30037973c6f5650 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 6 Jun 2008 18:02:00 -0700 Subject: added contract entry for state NEW for initial interface. Also add parameter to specify nexthop via interface in interface-health. This will be mandatory, but currently it is optional in the absence of a migration script. --- src/lbdecision.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lbdecision.cc') diff --git a/src/lbdecision.cc b/src/lbdecision.cc index 66f458b..005726b 100644 --- a/src/lbdecision.cc +++ b/src/lbdecision.cc @@ -108,7 +108,7 @@ if so then this stuff goes here! //NOTE, WILL NEED A WAY TO CLEAN UP THIS RULE ON RESTART... execute(string("iptables -t mangle -A ISP_") + buf + " -j ACCEPT"); - execute(string("ip route replace table ") + buf + " default dev " + iface); + execute(string("ip route replace table ") + buf + " default dev " + iface + " via " + iter->second._nexthop); execute(string("ip rule add fwmark ") + buf + " table " + buf); _iface_mark_coll.insert(pair(iface,ct)); @@ -176,7 +176,7 @@ LBDecision::run(LBData &lb_data) //last one is special case, the catch all rule ++w_iter; sprintf(dbuf,"%d",w_iter->first); - execute(string("iptables -t mangle -A PREROUTING ") + app_cmd + " -j ISP_" + dbuf); + execute(string("iptables -t mangle -A PREROUTING ") + app_cmd + " -m state --state NEW -j ISP_" + dbuf); ++iter; } } -- cgit v1.2.3