Project

General

Profile

« Previous | Next » 

Revision ed321966

Added by Viktor Gurov about 3 years ago

captiveportal_ether_delete_entry() anchors/pipes delete fix. Issue #13169

View differences:

src/etc/inc/captiveportal.inc
1106 1106
		$host = $hostent['ip'] . '_32';
1107 1107
	}
1108 1108

  
1109
	$result = pfSense_pf_cp_get_eth_pipes("{$cpzoneprefix}_{$anchor}/$host");
1109
	$result = pfSense_pf_cp_get_eth_pipes("{$cpzoneprefix}_{$anchor}/{$host}");
1110 1110
	if (!empty($result)) {
1111 1111
		list($pipeup, $pipedown) = $result;
1112
		captiveportal_free_dn_ruleno($pipeup);
1112
		captiveportal_pipe_delete($pipeup);
1113 1113
	}
1114 1114
	/* flush anchor rules */
1115 1115
	pfSense_pf_cp_flush("{$cpzoneprefix}_{$anchor}/{$host}", "ether");
src/etc/inc/filter.inc
492 492

  
493 493
	/* Captive Portal ether anchors:
494 494
	 * 'cpzoneid_X_passthrumac' - add PASS tag to MAC passthru entries 
495
	 * 'cpzoneid_X_allowedhostsmac' - add PASS tag for Allowed IP/Hostnames to bypass captive portal redirection
495
	 * 'cpzoneid_X_allowedhosts' - add PASS tag for Allowed IP/Hostnames to bypass captive portal redirection
496 496
	 * 'cpzoneid_X_auth' - add PASS tag to authenticated client
497 497
	 */
498 498
	$rules .= filter_captiveportal_ether();
src/usr/local/www/services_captiveportal_ip.php
64 64
		$ipent = $a_allowedips[$_POST['id']];
65 65

  
66 66
		if (isset($config['captiveportal'][$cpzone]['enable'])) {
67
			captiveportal_ether_delete_entry($ipent, 'allowedhostsmac');
67
			captiveportal_ether_delete_entry($ipent, 'allowedhosts');
68 68
		}
69 69

  
70 70
		unset($a_allowedips[$_POST['id']]);
src/usr/local/www/services_captiveportal_ip_edit.php
155 155

  
156 156
		if (isset($a_cp[$cpzone]['enable'])) {
157 157
			if (!empty($oldip)) {
158
				captiveportal_ether_delete_entry($oldip, 'allowedhostsmac');
158
				captiveportal_ether_delete_entry($oldip, 'allowedhosts');
159 159
			}
160 160
			captiveportal_allowedip_configure_entry($ip);
161 161
		}

Also available in: Unified diff