Pull request: dhcpd: fix ip ranges
Updates #2541. Squashed commit of the following: commit c81299991876f48836d24872d9145331a0bc9e6e Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Mar 16 18:10:07 2021 +0300 agherr: imp docs commit f43a5f5cde0ea16dd38dd533e16e415a1d306cb2 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Mar 16 17:35:59 2021 +0300 all: imp err handling, fix code commit ed26ad0ff53882725f7747264f8094e6fb9b0423 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Mar 16 12:24:17 2021 +0300 dhcpd: fix ip ranges
This commit is contained in:
@@ -100,11 +100,7 @@ func newDHCPOptionParser() (p *dhcpOptionParser) {
|
||||
|
||||
// parse parses an option. See the handlers' documentation for more info.
|
||||
func (p *dhcpOptionParser) parse(s string) (code uint8, data []byte, err error) {
|
||||
defer func() {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("invalid option string %q: %w", s, err)
|
||||
}
|
||||
}()
|
||||
defer agherr.Annotate("invalid option string %q: %w", &err, s)
|
||||
|
||||
s = strings.TrimSpace(s)
|
||||
parts := strings.SplitN(s, " ", 3)
|
||||
|
||||
Reference in New Issue
Block a user