Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in pillar if NTP FQDN is an empty string
Under some conditions e.g. when set from Monitor TUI NTP FQDN can be an empty string which causes a crash pillar;panic: runtime error: index out of range -1] pillar;goroutine 170248 [running]: pillar;github.com/lf-edge/eve/pkg/pillar/devicenetwork.ResolveWithSrcIP({0x0, 0x0}, {0xc002631950, 0x10, 0x10}, {0xc002631960, 0x10, 0x10}) pillar; /pillar/devicenetwork/dns.go:79 +0x4d4 pillar;github.com/lf-edge/eve/pkg/pillar/devicenetwork.ResolveCacheWrap.func1({0x0, 0x0}, {0xc002631950, 0x10, 0x10}, {0xc002631960, 0x10, 0x10}) pillar; /pillar/devicenetwork/dns.go:122 +0x1ca pillar;github.com/lf-edge/eve/pkg/pillar/devicenetwork.ResolveWithPortsLambda.func1({0xc002631950, 0x10, 0x10}, {0xc002631960, 0x10, 0x10}) pillar; /pillar/devicenetwork/dns.go:198 +0x17b pillar;created by github.com/lf-edge/eve/pkg/pillar/devicenetwork.ResolveWithPortsLambda pillar; /pillar/devicenetwork/dns.go:182 +0x98a Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
- Loading branch information