Revision c1f5a46b
Added by Scott Ullrich over 19 years ago
etc/inc/vpn.inc | ||
---|---|---|
88 | 88 |
function vpn_ipsec_configure($ipchg = false) { |
89 | 89 |
global $config, $g, $sa, $sn; |
90 | 90 |
|
91 |
/* get the automatic /etc/ping_hosts.sh ready */ |
|
92 |
unlink_if_exists("/var/db/ipsecpinghosts"); |
|
93 |
touch("/var/db/ipsecpinghosts"); |
|
94 |
|
|
91 | 95 |
if($g['booting'] == true) { |
92 | 96 |
/* determine if we should load the via padlock module */ |
93 | 97 |
$dmesg_boot = `cat /var/log/dmesg.boot | grep CPU`; |
... | ... | |
192 | 196 |
$tunnel['remote-gateway'] = $tmp; |
193 | 197 |
} |
194 | 198 |
|
199 |
/* add entry to host pinger */ |
|
200 |
if($tunnel['pinghost']) { |
|
201 |
$pfd = fopen("/var/db/ipsecpinghosts","a"); |
|
202 |
$srcip = find_interface_ip($config['interfaces']['lan']['if']); |
|
203 |
$dstip = $tunnel['pinghost']; |
|
204 |
fwrite($pfd, "$srcip|$dstip|3"); |
|
205 |
fclose($pfd); |
|
206 |
} |
|
207 |
|
|
195 | 208 |
if(isset($tunnel['creategif'])) { |
196 | 209 |
$number_of_gifs = find_last_gif_device(); |
197 | 210 |
$number_of_gifs++; |
Also available in: Unified diff
MFC vpn ping code