Revision 86667140
Added by Scott Ullrich over 20 years ago
etc/inc/interfaces.inc | ||
---|---|---|
264 | 264 |
function interfaces_carp_configure() { |
265 | 265 |
global $g, $config; |
266 | 266 |
if ($g['booting']) { |
267 |
echo "Configuring CARP interfaces... "; |
|
267 |
echo "Configuring CARP interfaces... \n";
|
|
268 | 268 |
} |
269 | 269 |
unlink_if_exists("/usr/local/etc/rc.d/carp.sh"); |
270 | 270 |
unlink_if_exists("/usr/local/pkg/pf/carp.sh"); |
... | ... | |
285 | 285 |
mwexec("/sbin/ifconfig pfsync0 syncif " . $carp_sync_int); |
286 | 286 |
mwexec("/sbin/ifconfig {$carp_sync_int} up"); |
287 | 287 |
mwexec("/sbin/ifconfig pfsync0 up"); |
288 |
mwexec("echo pass all proto pfsync from any to any | pfctl -"); |
|
288 |
if($g['booting']) { |
|
289 |
/* install rules to alllow pfsync to sync up during boot |
|
290 |
* carp interfaces will remain down until the bootup sequence finishes |
|
291 |
*/ |
|
292 |
exec("echo pass quick proto carp all keep state > /tmp/rules.boot"); |
|
293 |
exec("echo pass quick proto pfsync all keep state >> /tmp/rules.boot"); |
|
294 |
exec("/sbin/pfctl -f /tmp/rules.boot"); |
|
295 |
} |
|
289 | 296 |
$pfsync_instances_counter++; |
290 | 297 |
} |
291 | 298 |
} |
... | ... | |
303 | 310 |
$carp_instances_counter++; |
304 | 311 |
} |
305 | 312 |
} |
306 |
if ($g['booting']) { |
|
307 |
echo "Done\n"; |
|
308 |
} |
|
309 | 313 |
} |
310 | 314 |
|
311 | 315 |
function interfaces_carp_bringup() { |
Also available in: Unified diff
Correctly insert CARP and PFSYNC rules on boot