Révision 96fcabaa
Ajouté par Renato Botelho il y a presque 10 ans
etc/inc/filter.inc | ||
---|---|---|
106 | 106 |
else |
107 | 107 |
$maxstates = 150000; |
108 | 108 |
// nmbflows cpu count * ($maxstates * 2) |
109 |
$cpus = trim(`/sbin/sysctl -n kern.smp.cpus`, " \n");
|
|
109 |
$cpus = trim(exec('/sbin/sysctl -n kern.smp.cpus'), " \n");
|
|
110 | 110 |
$nmbflows = ($cpus*($maxstates*2)); |
111 | 111 |
// Flowtable currently only works on 8.0 |
112 | 112 |
if(get_freebsd_version() == "8") { |
etc/inc/gwlb.inc | ||
---|---|---|
754 | 754 |
mwexec("/sbin/route change {$inetfamily} default {$gateways_arr[$upgw]['gateway']}"); |
755 | 755 |
} |
756 | 756 |
} else { |
757 |
$defaultgw = trim(`/sbin/route -n get -{$ipprotocol} default | /usr/bin/grep gateway | /usr/bin/sed 's/gateway://g'`, " \n");
|
|
757 |
$defaultgw = trim(exec("/sbin/route -n get -{$ipprotocol} default | /usr/bin/awk '/gateway:/ {print $2}'"), " \n");
|
|
758 | 758 |
if(is_ipaddrv6($gateways_arr[$dfltgwname]['gateway'])) { |
759 | 759 |
$inetfamily = "-inet6"; |
760 | 760 |
} else { |
Formats disponibles : Unified diff
Replace some backticks by exec ans simplify commands