Merge branch 'master' of github.com:isomer/erbium
Perry Lorier
2 years ago
|
0 |
0.2.12-rc5 (UNRELEASED)
|
|
1 |
- DHCP: Bug Fix: If there are multiple active leases for a host, don't flip
|
|
2 |
between them, but instead try and keep one.
|
0 | 3 |
0.2.12-rc4
|
1 | 4 |
- Harden DNS listeners to avoid premature exits.
|
2 | 5 |
- Add `default-listen-style` to allow multiple DNS servers on one host.
|
409 | 409 |
(default: empty list)
|
410 | 410 |
This specifies which accesses the matched clients are permitted.
|
411 | 411 |
.RS
|
|
412 |
.IP "\fBdhcp-client\fP"
|
|
413 |
Permissions required for DHCP clients with default settings.
|
|
414 |
This is used to support future versions that may add additional protocols for DHCP clients.
|
|
415 |
Currently an alias for "dns-recursion".
|
412 | 416 |
.IP "\fBdns-recursion\fP"
|
413 | 417 |
Allows DNS recursion.
|
414 | 418 |
.IP "\fBhttp\fP"
|
287 | 287 |
let mut allow_http_leases = false;
|
288 | 288 |
for access in accesses {
|
289 | 289 |
match access.as_str() {
|
|
290 |
"dhcp-client" => {
|
|
291 |
allow_dns_recursion = true;
|
|
292 |
}
|
290 | 293 |
"dns-recursion" => allow_dns_recursion = true,
|
291 | 294 |
"http" => allow_http = true,
|
292 | 295 |
"http-metrics" => allow_http_metrics = true,
|
275 | 275 |
leases
|
276 | 276 |
WHERE clientid = ?1
|
277 | 277 |
AND expiry > ?2
|
278 | |
ORDER BY expiry DESC
|
|
278 |
ORDER BY
|
|
279 |
address=?3 DESC,
|
|
280 |
expiry DESC
|
279 | 281 |
LIMIT 1",
|
280 | |
rusqlite::params![clientid, ts as u32],
|
|
282 |
rusqlite::params![
|
|
283 |
clientid,
|
|
284 |
ts as u32,
|
|
285 |
requested.map(|ip| ip.to_string()).unwrap_or("".into())
|
|
286 |
],
|
281 | 287 |
|row| {
|
282 | 288 |
Ok(Some((
|
283 | 289 |
row.get::<usize, String>(0)?,
|
|
320 | 326 |
leases
|
321 | 327 |
WHERE clientid = ?1
|
322 | 328 |
GROUP BY 1
|
323 | |
ORDER BY expire_time DESC
|
|
329 |
ORDER BY
|
|
330 |
address=?2 DESC,
|
|
331 |
expire_time DESC
|
324 | 332 |
LIMIT 1
|
325 | 333 |
",
|
326 | |
rusqlite::params![clientid],
|
|
334 |
rusqlite::params![
|
|
335 |
clientid,
|
|
336 |
requested.map(|ip| ip.to_string()).unwrap_or("".into())
|
|
337 |
],
|
327 | 338 |
|row| {
|
328 | 339 |
Ok(Some((
|
329 | 340 |
row.get::<usize, String>(0)?,
|