diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-08 22:06:29 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-08 22:06:29 +0000 |
commit | 2ef90a068658de065084f4bdb384aa5df599b338 (patch) | |
tree | 69e6c459de9468b8652605e356adb020c1192271 /etc | |
parent | d7cb1aff0740421d52de2306a6469347608f0318 (diff) | |
download | pfsense-2ef90a068658de065084f4bdb384aa5df599b338.zip pfsense-2ef90a068658de065084f4bdb384aa5df599b338.tar.gz |
Misc comments
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index bbda672..db0e608 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1347,20 +1347,26 @@ function generate_user_filter_rule($rule, $ngcounter) { if($lb['name'] == $rule['gateway']) { $gateway = $rule['gateway']; $line .= " route-to { "; + /* if /tmp/$lbname.pool exists then read in our gateway hints from slbd */ if(file_exists("{$g['tmp_path']}/{$lb['name']}.pool")) { $lbs = split("\n", file_get_contents("{$g['tmp_path']}/{$lb['name']}.pool")); } else { $lbs = $lb['servers']; } + /* iterate through $lbs and setup items accordingly */ foreach($lbs as $server) { $gateway .= $server . " "; if($foundlb == 1) $line .= ", "; + /* we are seperating the monitor address from the gateway + * using the | character + */ if(stristr($rule['gateway'], "|") == true) { $split_ip = split("\|", $rule['gateway']); $rule['gateway'] = $split_ip[0]; $gateway .= $split_ip[0] . " "; } + /* deterimine interface from gateway address */ $int = guess_interface_from_ip($gateway); $line .= "(" . $int . " " . $gateway . ") "; $foundlb = 1; |