Revision 602f6d6e
Added by Marcos M almost 2 years ago
src/etc/inc/util.inc | ||
---|---|---|
4082 | 4082 |
} |
4083 | 4083 |
} |
4084 | 4084 |
|
4085 |
function pconfig_to_address(&$adr, $padr, $pmask, $pnot = false, $pbeginport = 0, $pendport = 0, $addmask = false) { |
|
4085 |
// does not support specialnet VIPs |
|
4086 |
function pconfig_to_address(&$adr, $padr, $pmask, $pnot = false, $pbeginport = 0, $pendport = 0, $addmask = false, $specialnet_flags = []) { |
|
4086 | 4087 |
$adr = array(); |
4087 | 4088 |
|
4088 | 4089 |
if ($padr == "any") { |
4089 | 4090 |
$adr['any'] = true; |
4090 |
} else if (get_specialnet($padr)) { |
|
4091 |
} else if (get_specialnet($padr, $specialnet_flags)) {
|
|
4091 | 4092 |
if ($addmask) { |
4092 | 4093 |
$padr .= "/" . $pmask; |
4093 | 4094 |
} |
Also available in: Unified diff
Specify specialnet flags when calling get_specialnet(). Fix #14935
Allow passing specialnet flags to pconfig_to_address() to correctly
handle address/network config elements. Also correctly handle VIP
selection in nat/binat rules.