Project

General

Profile

« Previous | Next » 

Revision d6d9144e

Added by Renato Botelho almost 10 years ago

Only call pfSense_ipsec_list_sa() when IPsec is enabled

View differences:

etc/inc/ipsec.inc
426 426
	return false;
427 427
}
428 428

  
429
/*
430
 * Wrapper to call pfSense_ipsec_list_sa() when IPsec is enabled
431
 */
432
function ipsec_list_sa() {
433
	global $config;
434

  
435
	if (isset($config['ipsec']['enable'])) {
436
		return pfSense_ipsec_list_sa();
437
	}
438

  
439
	return array();
440
}
441

  
429 442
/*
430 443
 * Return dump of SPD table
431 444
 */
usr/local/www/diag_ipsec.php
114 114

  
115 115
$a_phase1 = &$config['ipsec']['phase1'];
116 116

  
117
$status = pfSense_ipsec_list_sa();
117
$status = ipsec_list_sa();
118 118

  
119 119
?>
120 120

  
usr/local/www/widgets/widgets/ipsec.widget.php
51 51
	$spd = ipsec_dump_spd();
52 52
	$sad = ipsec_dump_sad();
53 53
	$mobile = ipsec_dump_mobile();
54
	$ipsec_status = pfSense_ipsec_list_sa();
54
	$ipsec_status = ipsec_list_sa();
55 55

  
56 56
	$activecounter = 0;
57 57
	$inactivecounter = 0;

Also available in: Unified diff