mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
internal/clientinfo: add kea-dhcp4 to readLeaseFile
While at it, also removing duplicated characters in cutset of strings.Trim function.
This commit is contained in:
committed by
Cuong Manh Le
parent
e42554f892
commit
6d3c86c0be
@@ -188,6 +188,8 @@ func (d *dhcp) readLeaseFile(name string, format ctrld.LeaseFileFormat) error {
|
||||
return d.dnsmasqReadClientInfoFile(name)
|
||||
case ctrld.IscDhcpd:
|
||||
return d.iscDHCPReadClientInfoFile(name)
|
||||
case ctrld.KeaDHCP4:
|
||||
return d.keaDhcp4ReadClientInfoFile(name)
|
||||
}
|
||||
return fmt.Errorf("unsupported format: %s, file: %s", format, name)
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ func parseHostEntriesConfFromReader(r io.Reader) map[string][]string {
|
||||
after = strings.TrimSpace(after)
|
||||
fields := strings.Fields(after)
|
||||
if len(fields) > 1 {
|
||||
localZone = strings.Trim(fields[0], `""`)
|
||||
localZone = strings.Trim(fields[0], `"`)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user