Codebase list erbium-upstream / b684ae8
Merge branch 'master' of github.com:isomer/erbium Perry Lorier 2 years ago
4 changed file(s) with 25 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
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.
03 0.2.12-rc4
14 - Harden DNS listeners to avoid premature exits.
25 - Add `default-listen-style` to allow multiple DNS servers on one host.
409409 (default: empty list)
410410 This specifies which accesses the matched clients are permitted.
411411 .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".
412416 .IP "\fBdns-recursion\fP"
413417 Allows DNS recursion.
414418 .IP "\fBhttp\fP"
287287 let mut allow_http_leases = false;
288288 for access in accesses {
289289 match access.as_str() {
290 "dhcp-client" => {
291 allow_dns_recursion = true;
292 }
290293 "dns-recursion" => allow_dns_recursion = true,
291294 "http" => allow_http = true,
292295 "http-metrics" => allow_http_metrics = true,
275275 leases
276276 WHERE clientid = ?1
277277 AND expiry > ?2
278 ORDER BY expiry DESC
278 ORDER BY
279 address=?3 DESC,
280 expiry DESC
279281 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 ],
281287 |row| {
282288 Ok(Some((
283289 row.get::<usize, String>(0)?,
320326 leases
321327 WHERE clientid = ?1
322328 GROUP BY 1
323 ORDER BY expire_time DESC
329 ORDER BY
330 address=?2 DESC,
331 expire_time DESC
324332 LIMIT 1
325333 ",
326 rusqlite::params![clientid],
334 rusqlite::params![
335 clientid,
336 requested.map(|ip| ip.to_string()).unwrap_or("".into())
337 ],
327338 |row| {
328339 Ok(Some((
329340 row.get::<usize, String>(0)?,